/** * Execute the console command. * * @return mixed */ public function handle() { $headers = ['User', 'PassWord']; $users = $this->admin->all(['user', 'password'])->toArray(); $this->table($headers, $users); }
/** * Execute the console command. * * @return mixed */ public function handle() { $this->admin->fill(['user' => $this->option('user'), 'password' => $this->option('password')])->save(); $this->info('Successfully created new admin user.'); }
/** * Test insert method. * * @dataProvider insertDataProvider * * @param mixed $user * @param mixed $password * @param bool $hasError */ public function testInsert($user, $password, $hasError) { $data = compact('user', 'password'); $response = $this->admin->insert($data); $this->checkError($response, $hasError); }