/** * Checks whether the current user is authorized to perform a particular action. * * @param string $role * @param Page $page */ public function authorization($role, Page $page = null) { if (!Auth::isLoggedIn()) { abort(401); } if (!Auth::loggedIn($role, $page)) { abort(403); } }