App\Policies\UserPolicy::destroy PHP Method

destroy() public method

public destroy ( User $currentUser, User $userToDestroy )
$currentUser app\models\User
$userToDestroy app\models\User
    public function destroy(User $currentUser, User $userToDestroy)
    {
        return $currentUser->is_admin && $currentUser->id !== $userToDestroy->id;
    }
UserPolicy