/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $user = Auth::user(); $categories = Category::all(); $video = Video::find($id); return view('videos.show', compact('user', 'video', 'categories')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(CategoriesRepository $repo) { $categories = Category::all(); $videos = Video::all(); $user = Auth::user(); return view('welcome', compact('categories', 'videos', 'user', 'repo')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $categories = Category::all(); $videos = Video::all(); $user = Auth::check(); return view('welcome', compact('categories', 'videos', 'user')); }