Exemplo n.º 1
0
 /**
  *  Gets category data
  */
 public function show($slug)
 {
     $category = Category::whereCategorySlug($slug)->first();
     $categories = Category::all();
     $videos = Video::whereCategoryId($category->id)->get();
     return view('home', compact('videos', 'categories'));
 }
Exemplo n.º 2
0
 /**
  *  Gets single video data
  */
 public function show($slug)
 {
     $categories = Category::all();
     $video = Video::whereSlug($slug)->first();
     return view('unitvideo', compact('video', 'categories'));
 }
Exemplo n.º 3
0
 /**
  * Gets dashboard
  */
 public function getDashboard()
 {
     $categories = Category::all();
     $videos = Video::orderBy('created_at', 'desc')->personal()->get();
     return view('dashboard', ['videos' => $videos, 'categories' => $categories]);
 }