Home and other changes

This commit is contained in:
Le Libre Au Quotidien 2020-10-15 12:22:51 +02:00
parent 5d87029f96
commit 441d46de15
1 changed files with 18 additions and 1 deletions

View File

@ -19,9 +19,26 @@ class ContentController extends Controller
public function show($path){
$content = Content::where('path', $path)->first();
$content = Content::where('path', $path)->firstOrFail();
return view('softbox')->with('content', $content);
}
public function home(){
$categories = Category::where("category_id", null)->get();
//dd($category);
return view('home')->with('categories', $categories);
}
public function search(){
$query = request()->input('query');
$contents = Content::where('name','like',"%$query%")->orWhere('description','like',"%$query%")->get();
dd($contents);
return view('search')->with('contents', $contents);
}
}