问题描述
我必须让 fortify 和 auth-api 一起工作。我现在正在向 API 发送请求以注册用户,但我无法获取 App\Models\User,需要什么强化我得到的只是 User Object 是否有人可以提供帮助
强化:
public function create(array $input) {
self::$password = $this->passwordGenerate();
Validator::make($input,[
'firstname' => ['required','string','max:255'],'name' => ['required','email' => ['required','email','max:255','email:dns'],])->validate();
$input['password'] = Hash::make(self::$password);
$client = new ApiAuthenticationSystemController();
$newUser = $client->responseEmsApiData('register/',$input);
$this->sendUserInfoEmail($newUser->email,$newUser->id,self::$password);
dd($newUser);
return redirect()->route('login');
API:
public function register(Request $request) {
$user = User::create([
'name' =>$request->get('name'),'firstname' => $request->get('firstname'),'email' => $request->get('email'),'password' => $request->input('password'),]);
return User::find($user['id']);
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)