morph map
This commit is contained in:
@@ -2,6 +2,15 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Models\Application;
|
||||
use App\Models\Deployment;
|
||||
use App\Models\Environment;
|
||||
use App\Models\Organisation;
|
||||
use App\Models\OrganisationUser;
|
||||
use App\Models\Server;
|
||||
use App\Models\Service;
|
||||
use App\Models\Slice;
|
||||
use App\Models\Step;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
@@ -22,6 +31,15 @@ class AppServiceProvider extends ServiceProvider
|
||||
public function boot(): void
|
||||
{
|
||||
Relation::enforceMorphMap([
|
||||
'application' => Application::class,
|
||||
'deployment' => Deployment::class,
|
||||
'environment' => Environment::class,
|
||||
'organisation' => Organisation::class,
|
||||
'organisation-user' => OrganisationUser::class,
|
||||
'server' => Server::class,
|
||||
'service' => Service::class,
|
||||
'slice' => Slice::class,
|
||||
'step' => Step::class,
|
||||
'user' => User::class,
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user