<?php

namespace App\Filament\Resources\KategoriResource\Pages;

use App\Filament\Resources\KategoriResource;
use Filament\Resources\Pages\CreateRecord;
use Filament\Notifications\Notification;

class CreateKategori extends CreateRecord
{
    protected static string $resource = KategoriResource::class;

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