public function edit($id) { $project = Project::findOrFail($id); $cat_list = CatProject::all(); return view('admin.pages.edit_project', ['project' => $project, 'cat_list' => $cat_list]); //dd($project); }
public function compose(View $view) { $view->with('CatList', \App\CatProject::All()); //todo }
public function get_cat() { return CatProject::where('id', $this->id); }