/** * Display a listing of the resource. * * @return Response */ public function index() { $cats = VideoCategories::all()->lists('name', 'id'); return view('videos.index')->with('categories', $cats); }
public function edit($id) { $video = Video::findOrFail($id); $cats = VideoCategories::all()->lists('name', 'id'); return view('admin.edit', ['video' => $video, 'categories' => $cats]); }