<?php

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

use App\Filament\RealEstate\Resources\ExpenseResource;
use Filament\Resources\Pages\CreateRecord;

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

    protected static string $resource = ExpenseResource::class;

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

        return $data;
    }
}
