canDo('category.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('category.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('category.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('category.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('category.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('category.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('category.category.reject')) { return true; } return false; } }