I’m trying to protect my profile edition page by using the following code:
auth()->$user->profile->update($data);
However, I’m getting the following error:
undefined property: Illuminate\Auth\AuthManager::${“id":1,“name”:“mourad”,“surname”:“BENOSB”,“email”:"mourad.benosmane@gmail.com”,“email_verified_at”:null,“created_at”:“2020-01-04 11:41:28”,“updated_at”:“2020-01-04 11:41:28”} http://127.0.0.1:8000/profile/1