Answers for "the morph relations laravel"

PHP
0

morph relation laravel

You may register the morphMap in the boot function of your 
AppProvidersAppServiceProvider class or create a separate service provider 
if you wish.

use IlluminateDatabaseEloquentRelationsRelation;

Relation::morphMap([
    'post' => 'AppModelsPost',
    'video' => 'AppModelsVideo',
]);
Posted by: Guest on January-06-2021

Code answers related to "the morph relations laravel"

Browse Popular Code Answers by Language