Exemplo n.º 1
0
 public function cancel(User $user, Order $order)
 {
     return $user->isOrderParticipant($order) and !$order->isLocked() and $order->hasNotShipped();
 }
Exemplo n.º 2
0
 public function review(User $reviewer, User $reviewee, Order $order)
 {
     return $reviewer->isOrderParticipant($order) and $reviewee->isOrderParticipant($order) and $reviewee->canBeReviewed($order);
 }