コード例 #1
0
ファイル: AdminListCommand.php プロジェクト: Hiroto-K/HkApps
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $headers = ['User', 'PassWord'];
     $users = $this->admin->all(['user', 'password'])->toArray();
     $this->table($headers, $users);
 }
コード例 #2
0
ファイル: AdminMakeCommand.php プロジェクト: Hiroto-K/HkApps
 /**
  * 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.');
 }
コード例 #3
0
ファイル: AdminTest.php プロジェクト: Hiroto-K/HkApps
 /**
  * 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);
 }