ldc-supportweb/app/Policies/CreditLogPolicy.php

23 lines
421 B
PHP
Raw Permalink Normal View History

2022-05-31 14:06:07 +02:00
<?php
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class CreditLogPolicy
2022-05-31 14:06:07 +02:00
{
use HandlesAuthorization;
/**
* Determine if the user can update a given ticket.
2022-05-31 14:06:07 +02:00
*
* @param \App\Models\User $user
* @return boolean
2022-05-31 14:06:07 +02:00
*/
public function update(User $user): bool
2022-05-31 14:06:07 +02:00
{
return $user->isAdmin() or $user->brands()->count() > 0;
2022-05-31 14:06:07 +02:00
}
}