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