<?php

namespace App\Providers;

use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;

class AuthServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        Gate::define('input-data', function ($user) {
            return in_array($user->role, ['admin', 'terapis']);
        });

        Gate::define('edit-data', function ($user) {
            return $user->role === 'admin';
        });
    }
}
