Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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',
]);
Comment

PREVIOUS NEXT
Code Example
Php :: Edit PHP INI 
Php :: php draw line pixel 
Php :: symfony get locale from request in controller 
Php :: console_log in php 
Php :: 1 to many relationship in laravel 
Php :: html windows logo 
Php :: using laravel passport with mongodb 
Php :: get time ISO 8601 wordpress 
Php :: custom blade if directive 
Php :: text to sha256 converter in laravel 
Php :: php call non static method from static method 
Php :: php is_assoc 
Php :: link title to blog post wordpress in the loop 
Php :: php preplace 
Php :: Laravel unique Validation with multiple input field 
Php :: test in laravel 
Php :: php check if item in array 
Php :: php echo example 
Php :: laravel route group 
Php :: php unix socket client 
Php :: codeigniter 3 session not working after some time 
Php :: laravel log query for model (full) 
Php :: delete a migration laravel 
Php :: screen size to php 
Php :: what is the use of migration file in laravel 
Php :: page.php woocommerce 
Php :: php typecast class 
Php :: php superglobal - $globals 
Php :: list function php 
Php :: laravel dependency injection 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =