canDo('coupon.coupon.approve')) { return true; } return false; } /** * Determine if the given user can approve the given coupon. * * @param Authenticatable $user * * @return bool */ public function submit(Authenticatable $user, Coupon $coupon) { if ($user->canDo('coupon.coupon.submit')) { return true; } return false; } /** * Determine if the given user can approve the given coupon. * * @param Authenticatable $user * * @return bool */ public function publish(Authenticatable $user, Coupon $coupon) { if ($user->canDo('coupon.coupon.publish')) { return true; } return false; } /** * Determine if the given user can approve the given coupon. * * @param Authenticatable $user * * @return bool */ public function unpublish(Authenticatable $user, Coupon $coupon) { if ($user->canDo('coupon.coupon.unpublish')) { return true; } return false; } /** * Determine if the given user can approve the given coupon. * * @param Authenticatable $user * * @return bool */ public function archive(Authenticatable $user, Coupon $coupon) { if ($user->canDo('coupon.coupon.archive')) { return true; } return false; } /** * Determine if the given user can approve the given coupon. * * @param Authenticatable $user * * @return bool */ public function unarchive(Authenticatable $user, Coupon $coupon) { if ($user->canDo('coupon.coupon.unarchive')) { return true; } return false; } /** * Determine if the given user can approve the given coupon. * * @param Authenticatable $user * * @return bool */ public function reject(Authenticatable $user, Coupon $coupon) { if ($user->canDo('coupon.coupon.reject')) { return true; } return false; } }