コード例 #1
0
 /**
  * Show the form for editing the specified video.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $video = Video::find($id);
     $video->link = 'http://www.youtube.com/watch?v=' . $video->youtube_id;
     $categories = Category::all();
     return view('videos.edit', ['video' => $video, 'categories' => $categories]);
 }
コード例 #2
0
 /**
  * Display a user's dashboard
  *
  * @return \Illuminate\View\View
  */
 public function dashboard()
 {
     $user = Auth::user();
     $categories = Category::all();
     return view('pages.dashboard', compact(['user', 'categories']));
 }