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())); } }); }
function error($message, $uri = null, $withInput = false, $data = []) { return \Boofw\Phpole\Http\Response::error($message, $uri, $withInput, $data); }