koel/app/Policies/UserPolicy.php
2016-09-26 14:30:00 +08:00

13 lines
237 B
PHP

<?php
namespace App\Policies;
use App\Models\User;
class UserPolicy
{
public function destroy(User $currentUser, User $userToDestroy)
{
return $currentUser->is_admin && $currentUser->id !== $userToDestroy->id;
}
}