/** * Instantiate the auth class. * * @return void */ public static function initialize() { // Load the auth config. $loaded = Config::file(path('config') . 'auth.php', 'auth'); // If no config was loaded, show an error. if (!$loaded) { exit('Unable to load auth config.'); } // Check if we have a user logged in. if (Session::has('auth.user') && Session::has('auth.authorized')) { static::$authorized = Session::get('auth.authorized'); static::$user = Session::get('auth.user'); } }