Ejemplo n.º 1
0
 /**
  * Fetches required variables for navigation
  */
 public function composeNavigation()
 {
     view()->composer('partials.nav', function ($view) {
         $view->with('latest', Broadcast::latest()->first());
     });
 }
Ejemplo n.º 2
0
 public function destroy($id)
 {
     $broadcast = Broadcast::whereId($id)->firstOrFail();
     $broadcast->delete();
     return redirect('/broadcast')->with('status', 'The broadcast ' . $broadcast->title . ' has been deleted!');
 }
Ejemplo n.º 3
0
 /**
  * @param Broadcast $broadcast
  * @param BroadcastRequest $request
  */
 public function syncGenres(Broadcast $broadcast, array $tags)
 {
     $broadcast->genres()->sync($tags);
 }