Closed
Description
- Laravel Version: 9.x-dev
- PHP Version: 8.1.7
- Database Driver & Version: Mariadb 10.7
Description:
Thanks a lot for the amazing work @jessarcher on #43156 .
Am getting an Illuminate\Database\ClassMorphViolationException
because I have Relation::enforceMorphMap for some classes. Kindly confirm if this is the desired behavior
Relation::enforceMorphMap([
'post' => Post::class,
'video' => Video::class,
]);
It otherwise works perfectly fine when the enforceMorphMap is commented out:
Steps To Reproduce:
- Add
Relation::enforceMorphMap(['model'=>'App\Models\Model'])
in theboot
method ofAppServiceProvider
and omitting to add\App\Models\User
- Run
artisan model:show User
Metadata
Metadata
Assignees
Labels
No labels