Пример #1
0
 /**
  * @param \Notadd\Install\Requests\InstallRequest $request
  *
  * @return \Illuminate\Contracts\View\View
  */
 public function store(InstallRequest $request)
 {
     $this->command = $this->getCommand('install');
     $this->command->setDataFromController($request->all());
     $input = new ArrayInput([]);
     $output = new BufferedOutput();
     $this->command->run($input, $output);
     $this->share('admin_account', $request->get('admin_account'));
     $this->share('admin_email', $request->get('admin_email'));
     $this->share('admin_password', $request->get('admin_password'));
     return $this->view('install::success');
 }
Пример #2
0
 /**
  * @return void
  */
 public function setDataFromCalling(InstallRequest $request)
 {
     $this->data->put('driver', 'mysql');
     $this->data->put('host', $request->offsetGet('host'));
     $this->data->put('database', $request->offsetGet('database'));
     $this->data->put('username', $request->offsetGet('username'));
     $this->data->put('password', $request->offsetGet('password'));
     $this->data->put('prefix', $request->offsetGet('prefix'));
     $this->data->put('admin_username', $request->offsetGet('admin_username'));
     $this->data->put('admin_password', $request->offsetGet('admin_password'));
     $this->data->put('admin_password_confirmation', $request->offsetGet('admin_password_confirmation'));
     $this->data->put('admin_email', $request->offsetGet('admin_email'));
     $this->data->put('title', $request->offsetGet('title'));
     $this->isDataSetted = true;
 }