Shift bindings

PHP 5.5.9+ adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP.
pull/1/head
Shift 2022-02-17 11:17:35 +00:00
parent ddfdade76a
commit 64b166716e
1 changed files with 3 additions and 3 deletions

View File

@ -14,9 +14,9 @@ class MorphServiceProvider extends ServiceProvider
public function boot() public function boot()
{ {
Relation::morphMap([ Relation::morphMap([
'contracts' => 'App\Models\Contract', 'contracts' => \App\Models\Contract::class,
'cars' => 'App\Models\Car', 'cars' => \App\Models\Car::class,
'contacts' => 'App\Models\Contact', 'contacts' => \App\Models\Contact::class,
]); ]);
} }