purityselect/app/Policies/ProvidersPolicy.php
2024-10-25 01:05:27 +05:00

52 lines
1.2 KiB
PHP

<?php
namespace App\Policies;
use App\Permissions\Modules\Admin;
use App\Permissions\Modules\Prescription;
use App\Permissions\Modules\Products;
use App\Permissions\Modules\Providers;
// use App\Models\Admin Admins;
use Illuminate\Auth\Access\HandlesAuthorization;
class ProvidersPolicy
{
use HandlesAuthorization;
private $class_name='Telemedpro';
/**
* Create a new policy instance.
*
* @return void
*/
public function __construct()
{
//
}
public function add($user)
{
return $user->role->havePermission(Providers::PROVIDER_ADD);
}
public function edit($user)
{
return $user->role->havePermission(Providers::PROVIDER_EDIT);
}
public function delete($user)
{
return $user->role->havePermission(Providers::PROVIDER_DELETE);
}
public function list($user)
{
return $user->role->havePermission(Providers::PROVIDER_VIEW);
}
public function view($user)
{
return $user->role->havePermission(Providers::PROVIDER_DETAIL);
}
public function meeting_history($user)
{
return $user->role->havePermission(Providers::PROVIDER_MEETING_HISTORY);
}
}