] * @since [v1.0] * @return View */ public function getIndex() { // Show the page if (Auth::user()->hasAccess('admin')) { $asset_stats=null; if ((!file_exists(storage_path().'/oauth-private.key')) || (!file_exists(storage_path().'/oauth-public.key'))) { \Artisan::call('passport:install'); \Artisan::call('migrate', ['--force' => true]); } return View::make('dashboard')->with('asset_stats', $asset_stats); } else { // Redirect to the profile page return redirect()->intended('account/view-assets'); } } }