25 lines
618 B
PHP
25 lines
618 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\TenantPackageResource\Pages;
|
|
|
|
use App\Filament\Resources\TenantPackageResource;
|
|
use Filament\Actions;
|
|
use Filament\Resources\Pages\CreateRecord;
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
class CreateTenantPackage extends CreateRecord
|
|
{
|
|
protected static string $resource = TenantPackageResource::class;
|
|
|
|
protected function mutateFormDataBeforeCreate(array $data): array
|
|
{
|
|
$data['tenant_id'] = Auth::user()->tenant_id;
|
|
|
|
return $data;
|
|
}
|
|
|
|
protected function getRedirectUrl(): string
|
|
{
|
|
return $this->getResource()::getUrl('index');
|
|
}
|
|
} |