<?php

namespace App\Filament\Resources\UserResource\Pages;

use App\Filament\Resources\UserResource;
use Filament\Actions;
use Filament\Notifications\Notification;
use Filament\Resources\Pages\EditRecord;

class EditUser extends EditRecord
{
    protected static string $resource = UserResource::class;

    protected function beforeSave(): void
    {
        if (config('app.demo', false)) {
                        Notification::make()
                ->danger()
                ->title('Demo modunda bu işlem yapılamaz.')
                ->send();
            $this->halt(); // Kaydı kaydetmeyi durdurur
        }
    }
}
