Esempio n. 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'));
 }
Esempio n. 2
0
 public function whatisnew()
 {
     $whatisnew = [];
     $xcasts = Xcast::latest('updated_at')->take(16)->remember(10)->get();
     // dd(\DB::getQueryLog());
     $xcasts->each(function ($cast) use(&$whatisnew) {
         $whatisnew[$cast->updated_at->toFormattedDateString()][] = $cast;
     });
     return View::make('site.whatisnew', compact('whatisnew'));
 }