Home and other changes
This commit is contained in:
parent
5d87029f96
commit
441d46de15
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue