aauth = new Aauth(); $this->config = new AauthConfig(); helper('aauth'); if (! $this->aauth->isLoggedIn()) { return service('response')->redirect('/'); } } /** * Index * * @return void */ public function index() { $data['user'] = $this->aauth->getUser(); if ($this->config->socialEnabled) { $data['providers'] = []; foreach ($this->aauth->getProviders() as $provider) { $data['providers'][$provider] = $this->aauth->getSocialIdentifier($provider, $data['user']['id']); } } echo view('Account/Home', $data); } }