error('Unable to connect to database.'); $this->error('Please fill valid database credentials into .env and rerun this command.'); return; } $this->comment('Attempting to install Attendize v'.$version); if (!env('APP_KEY')) { $this->info('Generating app key'); Artisan::call('key:generate'); } else { $this->comment('App key exists -- skipping'); } $this->info('Migrating database'); Artisan::call('migrate', ['--force' => true]); if (!Timezone::count()) { $this->info('Seeding DB data'); Artisan::call('db:seed', ['--force' => true]); } else { $this->comment('Data already seeded -- skipping'); } file_put_contents(base_path('installed'), $version); $this->comment('Success! You can now run Attendize'); $this->comment('Navigate to /signup to create your account.'); } }