<?php

namespace App\Filament\RealEstate\Resources\DocumentResource\Pages;

use App\Filament\RealEstate\Resources\DocumentResource;
use Filament\Actions;
use Filament\Resources\Pages\CreateRecord;

class CreateDocument extends CreateRecord
{
    use \App\Filament\Concerns\RedirectsToIndex;

    protected static string $resource = DocumentResource::class;

    protected function mutateFormDataBeforeCreate(array $data): array
    {
        $data['uploaded_by'] = auth()->id();

        return $data;
    }
}
