예제 #1
0
 /**
  * Display a listing of xcasts
  *
  * @return Response
  */
 public function index()
 {
     $search = Request::get('q');
     $xcasts = $search ? Xcast::search($search) : Xcast::latest('updated_at');
     if (!Entrust::can('manage_premium_casts') && !Entrust::can('delete_casts')) {
         $xcasts = $xcasts->onlyFree();
     }
     $xcasts = $xcasts->paginate(8);
     return View::make('admin.xcasts.index', compact('xcasts'));
 }
예제 #2
0
 public function browse()
 {
     $search = Request::get('q');
     $xcasts = $search ? Xcast::search($search)->get() : Xcast::all()->sortBy('title');
     return View::make('site.browse', compact('xcasts'));
 }