morph laravel without classes name

Solutions on MaxInterview for morph laravel without classes name by the best coders in the world

showing results for - "morph laravel without classes name"
Emiliano
07 Jun 2017
1// app/config/app.php or anywhere you like
2'aliases' => [
3    ...
4    'MorphOrder' => 'Some\Namespace\Order',
5    'MorphStaff' => 'Maybe\Another\Namespace\Staff',
6    ...
7]
8
9// Staff model
10protected $morphClass = 'MorphStaff';
11
12// Order model
13protected $morphClass = 'MorphOrder';