<?php

namespace App\Services;

use Illuminate\Support\Facades\DB;

class PermissionService
{
    public function getPermissionByRole($role_id)
    {
        return DB::table('role_has_permissions')
            ->join('permissions', 'role_has_permissions.permission_id', '=', 'permissions.id')
            ->where('role_has_permissions.role_id', $role_id)
            ->get();
    }
}
