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