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