Answers for "morph laravel without classes name"

PHP
0

morph laravel without classes name

// app/config/app.php or anywhere you like
'aliases' => [
    ...
    'MorphOrder' => 'Some\Namespace\Order',
    'MorphStaff' => 'Maybe\Another\Namespace\Staff',
    ...
]

// Staff model
protected $morphClass = 'MorphStaff';

// Order model
protected $morphClass = 'MorphOrder';
Posted by: Guest on September-15-2020

Code answers related to "morph laravel without classes name"

Browse Popular Code Answers by Language