public function postCreate() { $a = new Admin(); $a->fill($_POST); $a->password = password_hash($_POST['password'], PASSWORD_DEFAULT); $result = $a->save(); if ($result) { $this->service->flash('The admin was created.', 'success'); } else { $this->service->flash('Can\'t create the admin.', 'alert'); } return $this->service->back(); }