Redirect to index if search keyword is empty

This commit is contained in:
gplane 2017-04-25 08:51:30 +08:00
parent 4311af2a5f
commit 293cb0e457

View File

@ -80,6 +80,10 @@ class SkinlibController extends Controller
$sort_by = ($sort == "time") ? "upload_at" : $sort;
if ($q == '') {
return redirect('skinlib');
}
if ($filter == "skin") {
$textures = Texture::like('name', $q)->where(function($query) use ($q) {
$query->where('type', '=', 'steve')