ldc-supportweb/app/Policies/CreditLogPolicy.php
2023-08-14 09:23:39 +00:00

22 lines
415 B
PHP

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