Example #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function show($slug)
 {
     $reel = Reel::findBySlugOrFail($slug);
     //dd($reel->clips);
     //$reel->image = Storage::get('1453469703phpBQmNa5.PNG');
     //dd($reel);
     return view('public.show', compact('reel'));
 }
Example #2
0
 public function addClip($reel_id, $clip_id, $sort_id)
 {
     $reel = Reel::find($reel_id);
     $reel->clips()->attach(array($clip_id => ['sort' => $sort_id]));
     $pivot_id = $reel->latestClipAdded()->first()->pivot->id;
     return $pivot_id;
 }