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