info('Setting up production environment'); $this->migrateDatabase(); $this->generateKey(); $this->createPassportKeys(); $this->createPassportClientPassword(); $this->createPassportClientPersonal(); $this->createDefaultUser(); $this->info('Everything is done, congratulations! 🥳🥳🥳'); } /** * Migrate database */ public function generateKey() { $this->call('key:generate'); } /** * Migrate database */ public function migrateDatabase() { $this->call('migrate:fresh'); } /** * Create Passport Encryption keys */ public function createPassportKeys() { $this->call('passport:keys', [ '--force' => true ]); } /** * Create Password grant client */ public function createPassportClientPassword() { $this->call('passport:client', [ '--password' => true, '--name' => 'vuefilemanager', ]); $this->alert('Please copy these first password grant Client ID & Client secret above to your /.env file.'); } /** * Create Personal access client */ public function createPassportClientPersonal() { $this->call('passport:client', [ '--personal' => true, '--name' => 'shared', ]); } /** * Create Default User */ public function createDefaultUser() { $user = User::create([ 'name' => 'Jane Doe', 'email' => 'howdy@hi5ve.digital', 'password' => \Hash::make('vuefilemanager'), ]); $this->info('Test user created. Email: ' . $user->email . ' Password: vuefilemanager'); } }