<?php

namespace App\Business\UserProfile\UserPermissions;

use App\Models\UserPermmision;

class PermissionsService
{
    public static function hasPermission($id) {
        
    }

    public static function setPermission($user, $permission){
        UserPermmision::create([
            'permission_id' => $permission,
            'user_id' => $user
        ]);
    }

    public static function removePermissionToUser($user, $permission){
        $permission = PermissionGetter::getOnlyPermissionByUser($user, $permission);
        if($permission) $permission->delete();
    }
}
