public static function boot() { parent::boot(); Report::saved(function ($report) { Report::clearCache(); }); Report::deleted(function ($report) { Report::clearCache(); }); }
public function reports() { Auth::basic('username'); if (!Auth::check()) { // do auth Auth::basic('username'); if (!Auth::check()) { return Response::make(View::make('unauth', array()), 401)->header('WWW-Authenticate', 'Basic'); } } Report::clearCache(); $reports = Report::select()->with('pathRecord', 'user')->orderBy('created_at', 'desc')->paginate(30); return View::make('reports', array('reports' => $reports, 'pageTitle' => 'Reports')); }
public function reports() { Report::clearCache(); $reports = Report::select()->with('pathRecord', 'user')->orderBy('created_at', 'desc')->paginate(30); return View::make('reports', array('reports' => $reports, 'pageTitle' => 'Reports')); }