/**
  * Bind data to the view.
  *
  * @param  View  $view
  * @return void
  */
 public function compose(View $view)
 {
     if ($this->shows == null) {
         $this->shows = Show::orderBy('name', 'asc')->get();
     }
     $view->with('shows', $this->shows);
 }
Esempio n. 2
0
 /**
  * Display a listing of the Shows.
  *
  * @return Response
  */
 public function index()
 {
     $shows = Show::orderBy('name', 'asc')->get();
     return view('admin.shows.index', ['shows' => $shows]);
 }