table = DB::table('users'); } public function insert($name, $email, $password) { $this->table->insert(compact('name', 'email', 'password')); } // пароль должен обновляться отдельно от профиля public function updateProfile($id, $name, $email) { $this->table->where('id', $id)->update(compact('name', 'email')); } public function findCoolestUser() { return $this->table->orderBy('rating', 'DESC')->first(); // } } $usersTable = new UserTableGateway(); $usersTable->insert('Sergey', 'fesor@example.com`, password_hash('somepassword', PASSWORD_DEFAULT)); $user = $usersTable->findCoolestUser(); // вернет нам один ряд