This commit is contained in:
2023-11-30 12:35:38 +05:00
parent c3ef45134c
commit 2682c02ab0
5 changed files with 118 additions and 22 deletions

View File

@@ -13,7 +13,11 @@ class ProvincePolicy
*/
public function viewAny(User $user): bool
{
//
if ($user->isAdmin()) {
return true;
}
return false;
}
/**
@@ -21,7 +25,11 @@ class ProvincePolicy
*/
public function view(User $user, Province $province): bool
{
//
if ($user->isAdmin()) {
return true;
}
return false;
}
/**
@@ -29,7 +37,11 @@ class ProvincePolicy
*/
public function create(User $user): bool
{
//
if ($user->isAdmin()) {
return true;
}
return false;
}
/**
@@ -37,7 +49,11 @@ class ProvincePolicy
*/
public function update(User $user, Province $province): bool
{
//
if ($user->isAdmin()) {
return true;
}
return false;
}
/**
@@ -45,7 +61,11 @@ class ProvincePolicy
*/
public function delete(User $user, Province $province): bool
{
//
if ($user->isAdmin()) {
return true;
}
return false;
}
/**
@@ -53,7 +73,11 @@ class ProvincePolicy
*/
public function restore(User $user, Province $province): bool
{
//
if ($user->isAdmin()) {
return true;
}
return false;
}
/**
@@ -61,6 +85,10 @@ class ProvincePolicy
*/
public function forceDelete(User $user, Province $province): bool
{
//
if ($user->isAdmin()) {
return true;
}
return false;
}
}