<?php

namespace App\Policies;

use App\Config;
use Illuminate\Auth\Access\HandlesAuthorization;

class ConfigPolicy
{
    use HandlesAuthorization;


    public function before($user, $ability)
    {
        if ($user->role === 'admin') {
            return true;
        }
    }


    
    public function index(User $user)
    {
        return $user->role === 'admin';
    }



    public function preview_qrcode(User $user)
    {
        return $user->role === 'admin';
    }

}
