main view implemented and some smaller fixe for some of the layouts

This commit is contained in:
noxy
2019-09-08 05:13:28 +00:00
parent 45bab2567a
commit 6ca6ed4080
11 changed files with 89 additions and 23 deletions

View File

@@ -38,6 +38,23 @@ class VideoController extends Controller
]);
}
public function main(Request $request) {
if($request->has('q')){
$needle = trim($request->input('q'));
return view('main', [
'videos' => Video::filtered()->withAnyTagsFuzzy($needle)
->orderBy('id', 'desc')
->paginate(55)->appends(['q' => $needle]),
'categories' => Category::all(),
'q' => $needle
]);
}
return view('main', [
'videos' => Video::filtered()->orderBy('id', 'DESC')->paginate(55),
'categories' => Category::all()
]);
}
/**
* Show the form for creating a new resource.
*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 KiB

After

Width:  |  Height:  |  Size: 68 KiB