如何在 laravel 7 中獲取插入的 id ?if (!User::where('Name', $u['name'])->exists()) { $user= new User; $user->key = $u['key']; $user->Name = $u['name']; $user->save(); dd($user->id()); }這是我的錯(cuò)誤Call to undefined method App\User::id()
如何在 laravel 7 中獲取最后插入的 id?
ibeautiful
2023-06-24 15:55:19