Beispiel #1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     \DB::beginTransaction();
     try {
         $this->info('Welcome to the Laravel-Admin Installer');
         $this->info('Creating basic user and Roles');
         $installer = new AdminInstaller();
         $installer->install('*****@*****.**', 'secret');
         \DB::commit();
         $this->info('Thanks! we are done!');
     } catch (\Exception $e) {
         \DB::rollback();
         $this->error('Something went wrong!. ' . $e->getMessage());
     }
 }
Beispiel #2
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     \DB::beginTransaction();
     try {
         $this->info('Welcome to the Laravel-Admin Installer');
         $email = $this->ask('Please enter the email for the administrator');
         $password = $this->secret('Please enter the password for the administrator');
         $this->info('Please give us a minute while we install everything');
         $this->info('Working on ACL');
         $this->call('entrust:migration');
         $this->info('Migrating Database');
         $this->call('migrate');
         $this->info('Creating basic user and Roles');
         $installer = new AdminInstaller();
         $installer->install($email, $password);
         $this->info('Publishing Package stuff');
         $this->call('vendor:publish', ['--provider' => 'Joselfonseca\\LaravelAdmin\\Providers\\LaravelAdminServiceProvider']);
         \DB::commit();
         $this->info('Thanks! we are done!');
     } catch (\Exception $e) {
         \DB::rollback();
         $this->error('Something went wrong!. ' . $e->getMessage());
     }
 }