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