feat: Implement morph maps and historical migration
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use Carbon\CarbonImmutable;
|
||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Illuminate\Support\Facades\Date;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -26,6 +27,13 @@ class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
JsonResource::withoutWrapping();
|
||||
$this->configureDefaults();
|
||||
|
||||
Relation::morphMap([
|
||||
'user' => \App\Models\User::class,
|
||||
'dynamic' => \App\Models\Dynamic::class,
|
||||
'ledger' => \App\Models\Ledger::class,
|
||||
'mutation' => \App\Models\Mutation::class,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user