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