From 64b166716e63379025ce30a8b27b065a413771d3 Mon Sep 17 00:00:00 2001 From: Shift Date: Thu, 17 Feb 2022 11:17:35 +0000 Subject: [PATCH] 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. --- app/Providers/MorphServiceProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Providers/MorphServiceProvider.php b/app/Providers/MorphServiceProvider.php index e841f91..88077f0 100644 --- a/app/Providers/MorphServiceProvider.php +++ b/app/Providers/MorphServiceProvider.php @@ -14,9 +14,9 @@ class MorphServiceProvider extends ServiceProvider public function boot() { Relation::morphMap([ - 'contracts' => 'App\Models\Contract', - 'cars' => 'App\Models\Car', - 'contacts' => 'App\Models\Contact', + 'contracts' => \App\Models\Contract::class, + 'cars' => \App\Models\Car::class, + 'contacts' => \App\Models\Contact::class, ]); }