Beispiel #1
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     // Show the welcome message
     $this->showWelcomeMessage();
     // Ask for the database details
     $this->askDatabaseDetails();
     // Ask for the default user details
     $this->askDefaultUserDetails();
     // Install Platform :)
     $this->installer->install();
     $this->comment('Installation complete :)');
 }
 /**
  * Handles the configuration and installation of Platform.
  *
  * @return mixed
  */
 public function configure()
 {
     $this->installer->setUserData(request()->input('user', []));
     $this->installer->setDatabaseData($driver = request()->input('database.driver'), request()->input("database.{$driver}", []));
     $messages = $this->installer->validate();
     if (!$messages->isEmpty()) {
         return redirect()->back()->withLicense(true)->withInput()->withErrors($messages);
     }
     try {
         $this->installer->install();
     } catch (\Exception $e) {
         return redirect()->back()->withLicense(true)->withInput()->withErrors($e->getMessage());
     }
     return redirect('installer/complete');
 }