public getOwners ( ) : stdClass | ||
return | stdClass |
public function getOwners()
{
return \DB::table($this->getTableName())->where('role', UserRoleService::ROLE_ID_OWNER)->get();
}
public function run() { $userRepo = new UserRepository(); // check data $ret = $userRepo->getOwners(); if (!empty($ret)) { echo "dont need UserTableSeeder\n"; return; } // member $params = ['username' => 'admin', 'email' => '*****@*****.**', 'password' => password_hash('password', PASSWORD_DEFAULT), 'role' => 2]; $userRepo->insert($params); }