main view implemented and some smaller fixe for some of the layouts
This commit is contained in:
@@ -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 |
Reference in New Issue
Block a user