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 |
@@ -99,6 +99,7 @@ Route::group(["middleware" => "theme"], function() {
|
||||
Route::post('register', 'UserController@store');
|
||||
Route::get('activate/{token}', 'UserController@activate');
|
||||
Route::get('index', 'VideoController@index')->middleware('auth');
|
||||
Route::get('main', 'VideoController@main')->middleware('auth');
|
||||
Route::post('index/{id}', 'VideoController@update')->middleware('auth');
|
||||
Route::get('upload', 'VideoController@create')->middleware('auth');
|
||||
Route::get('categories', 'CategoryController@index')->middleware('auth');
|
||||
|
Reference in New Issue
Block a user