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