-
Hi, I have troubles when I try to install spatie/laravel-permission. I have the error No morph map defined for model [App\Models\User] When I installed spatie with composer require spatie/laravel-permission, I got that :
I also updated composer, check my User model, recheck the doc but still. I think there is someting with either my installation, my requirements or my application itself. Do you have any idea ? The User model : https://pastebin.com/rp05XFaA Edit : I update Laravel 8 to 9, but it doent solve my issue |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Ok I got it. The issue was because I used Relation::enforceMorphMap in the AppServiceProvider. Maybe it will help to know that |
Beta Was this translation helpful? Give feedback.
-
How can I fix this exception |
Beta Was this translation helpful? Give feedback.
Ok I got it. The issue was because I used Relation::enforceMorphMap in the AppServiceProvider.
Maybe it will help to know that