<?php
namespace App\Policies;
use Illuminate\Auth\Access\HandlesAuthorization;
use App\Model\User;
use App\Model\PaymentMethod;
class PaymentMethodPolicy
{
use HandlesAuthorization;
public function delete(User $user, PaymentMethod $paymentMethod)
{
return $paymentMethod->customer_id == $user->customer->id;
}
}