PHP code example of sebastiaanluca / laravel-auto-morph-map
1. Go to this page and download the library: Download sebastiaanluca/laravel-auto-morph-map library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sebastiaanluca / laravel-auto-morph-map example snippets
use Illuminate\Database\Eloquent\Relations\Relation;
Relation::morphMap([
'posts' => \App\Post::class,
'videos' => \App\Video::class,
]);