App\Policies\UserPolicy::destroy PHP 메소드

destroy() 공개 메소드

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