Answers for "laravel morph not class"

PHP
0

morph laravel without classes name

// app/config/app.php or anywhere you like
'aliases' => [
    ...
    'MorphOrder' => 'SomeNamespaceOrder',
    'MorphStaff' => 'MaybeAnotherNamespaceStaff',
    ...
]

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

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

Code answers related to "laravel morph not class"

Browse Popular Code Answers by Language