Пример #1
0
 static function init()
 {
     if (Arr::get(self::$filters, 'auth') instanceof Closure) {
         return false;
     }
     self::add('auth', function () {
         if (!Auth::id()) {
             die(Response::redirect(url('auth/login')));
         }
     });
     self::add('guest', function () {
         if (Auth::id()) {
             die(Response::redirect(Auth::referer()));
         }
     });
 }
Пример #2
0
 function error($message, $uri = null, $withInput = false, $data = [])
 {
     return \Boofw\Phpole\Http\Response::error($message, $uri, $withInput, $data);
 }