Skip to content

Commit 185c545

Browse files
authored
Merge pull request #958 from bavix/vitepress
Docs v2.0
2 parents f15232b + ee8bee7 commit 185c545

File tree

211 files changed

+5670
-2175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+5670
-2175
lines changed

.github/workflows/deploy.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Sample workflow for building and deploying a VitePress site to GitHub Pages
2+
#
3+
name: Deploy VitePress site to Pages
4+
5+
on:
6+
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
7+
# using the `master` branch as the default branch.
8+
push:
9+
branches: [master]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22+
concurrency:
23+
group: pages
24+
cancel-in-progress: false
25+
26+
jobs:
27+
# Build job
28+
build:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0 # Not needed if lastUpdated is not enabled
35+
# - uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
36+
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
37+
- name: Setup Node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: 20
41+
cache: npm # or pnpm / yarn
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v4
44+
- name: Install dependencies
45+
run: npm ci # or pnpm install / yarn install / bun install
46+
- name: Build with VitePress
47+
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: docs/.vitepress/dist
52+
53+
# Deployment job
54+
deploy:
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
needs: build
59+
runs-on: ubuntu-latest
60+
name: Deploy
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ laravel-wallet - Easy work with virtual wallet.
1010

1111
[[Benchmark](https://github.com/bavix/laravel-wallet-benchmark/)]
1212
[[Documentation](https://bavix.github.io/laravel-wallet/)]
13-
[[Get Started](https://bavix.github.io/laravel-wallet/#/basic-usage)]
13+
[[Get Started](https://bavix.github.io/laravel-wallet/guide/introduction/)]
1414

1515
* **Vendor**: bavix
1616
* **Package**: laravel-wallet

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
}
6060
},
6161
"scripts": {
62-
"docs": "@php -S localhost:3000 -t ./docs",
6362
"parabench":"@php ./vendor/bin/testbench package:test --coverage-xml=build/coverage-xml --log-junit=build/junit.xml",
6463
"infect": "@php vendor/bin/infection --coverage=build --min-msi=50 -j$(nproc) --only-covering-test-cases",
6564
"phpstan": ["@phpstan-src", "@phpstan-tests"],

docs/.nojekyll

Whitespace-only changes.

docs/.vitepress/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cache/

docs/.vitepress/config.mts

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
title: "Laravel Wallet",
6+
description: "Easy work with virtual wallet",
7+
base: '/laravel-wallet/',
8+
head: [
9+
[
10+
'script',
11+
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-LNEGT551DV' }
12+
],
13+
[
14+
'script',
15+
{},
16+
`window.dataLayer = window.dataLayer || [];
17+
function gtag(){dataLayer.push(arguments);}
18+
gtag('js', new Date());
19+
gtag('config', 'G-LNEGT551DV');`
20+
],
21+
[
22+
'link', {
23+
rel: 'mask-icon',
24+
href: 'https://github.com/bavix/laravel-wallet/assets/5111255/f48a8e79-8a9d-469a-b056-b3d04835992d',
25+
color: "#f4e664",
26+
}
27+
],
28+
],
29+
themeConfig: {
30+
// https://vitepress.dev/reference/default-theme-config
31+
search: {
32+
provider: 'local'
33+
},
34+
editLink: {
35+
pattern: 'https://github.com/bavix/laravel-wallet/edit/master/docs/:path'
36+
},
37+
nav: [
38+
{ text: 'Home', link: '/' },
39+
{ text: 'Guide', link: '/guide/introduction/' },
40+
{ text: 'Chat', link: 'https://t.me/laravel_wallet' },
41+
{ text: 'Issues', link: 'https://github.com/bavix/laravel-wallet/issues' },
42+
{ text: 'Discussions', link: 'https://github.com/bavix/laravel-wallet/discussions' },
43+
{ text: 'Donate', link: 'https://opencollective.com/laravel-wallet' },
44+
],
45+
46+
sidebar: [
47+
{
48+
text: 'Getting started',
49+
items: [
50+
{ text: 'Introduction', link: '/guide/introduction/' },
51+
{ text: 'Installation', link: '/guide/introduction/installation' },
52+
{ text: 'Configuration', link: '/guide/introduction/configuration' },
53+
{ text: 'Basic Usage', link: '/guide/introduction/basic-usage' },
54+
{ text: 'Upgrade', link: '/guide/introduction/upgrade' },
55+
]
56+
},
57+
{
58+
text: 'Single/Default Wallet',
59+
items: [
60+
{ text: 'Deposit', link: '/guide/single/deposit' },
61+
{ text: 'Withdraw', link: '/guide/single/withdraw' },
62+
{ text: 'Transfer', link: '/guide/single/transfer' },
63+
{ text: 'Refresh Balance', link: '/guide/single/refresh' },
64+
{ text: 'Confirm Transaction', link: '/guide/single/confirm' },
65+
{ text: 'Cancel Transaction', link: '/guide/single/cancel' },
66+
{ text: 'Exchange', link: '/guide/single/exchange' },
67+
{ text: 'Credit Limits', link: '/guide/single/credit-limits' },
68+
]
69+
},
70+
{
71+
text: 'Multi Wallet',
72+
items: [
73+
{ text: 'New Wallet', link: '/guide/multi/new-wallet' },
74+
{ text: 'Transfer', link: '/guide/multi/transfer' },
75+
{ text: 'Transaction Filter', link: '/guide/multi/transaction-filter' },
76+
]
77+
},
78+
{
79+
text: 'Fractional Wallet',
80+
items: [
81+
{ text: 'Deposit', link: '/guide/fractional/deposit' },
82+
{ text: 'Withdraw', link: '/guide/fractional/withdraw' },
83+
{ text: 'Transfer', link: '/guide/fractional/transfer' },
84+
]
85+
},
86+
{
87+
text: 'Purchases',
88+
items: [
89+
{ text: 'Payment', link: '/guide/purchases/payment' },
90+
{ text: 'Payment Free', link: '/guide/purchases/payment-free' },
91+
{ text: 'Refund', link: '/guide/purchases/refund' },
92+
{ text: 'Gift', link: '/guide/purchases/gift' },
93+
{ text: 'Cart', link: '/guide/purchases/cart' },
94+
{ text: 'Commissions', link: '/guide/purchases/commissions' },
95+
{ text: 'Customize receiving', link: '/guide/purchases/receiving' },
96+
]
97+
},
98+
{
99+
text: 'Database Transaction',
100+
items: [
101+
{ text: 'Atomic Service', link: '/guide/db/atomic-service' },
102+
{ text: 'Race Condition', link: '/guide/db/race-condition' },
103+
{ text: 'Transaction', link: '/guide/db/transaction' },
104+
]
105+
},
106+
{
107+
text: 'Events',
108+
items: [
109+
{ text: 'Balance Updated', link: '/guide/events/balance-updated-event' },
110+
{ text: 'Wallet Created', link: '/guide/events/wallet-created-event' },
111+
{ text: 'Transaction Created', link: '/guide/events/transaction-created-event' },
112+
{ text: 'Customize', link: '/guide/events/customize' },
113+
]
114+
},
115+
{
116+
text: 'Helpers',
117+
items: [
118+
{ text: 'Formatter', link: '/guide/helpers/formatter' },
119+
]
120+
},
121+
{
122+
text: 'High performance api handles',
123+
items: [
124+
{ text: 'Batch Transactions', link: '/guide/high-performance/batch-transactions' },
125+
{ text: 'Batch Transfers', link: '/guide/high-performance/batch-transfers' },
126+
]
127+
},
128+
{
129+
text: 'CQRS',
130+
items: [
131+
{ text: 'Create Wallet', link: '/guide/cqrs/create-wallet' },
132+
]
133+
},
134+
{
135+
text: 'Additions',
136+
items: [
137+
{ text: 'Wallet Swap', link: '/guide/additions/swap' },
138+
{ text: 'Support UUID', link: '/guide/additions/uuid' },
139+
]
140+
},
141+
],
142+
143+
socialLinks: [
144+
{ icon: 'github', link: 'https://github.com/bavix/laravel-wallet' },
145+
],
146+
147+
footer: {
148+
message: 'Released under the <a href="https://github.com/bavix/laravel-wallet/blob/master/LICENSE">MIT License</a>.',
149+
copyright: 'Copyright © 2018-present <a href="https://github.com/rez1dent3">Babichev Maksim</a>'
150+
}
151+
}
152+
})

docs/.vitepress/dist/404.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en-US" dir="ltr">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width,initial-scale=1">
6+
<title>404 | Laravel Wallet</title>
7+
<meta name="description" content="Not Found">
8+
<meta name="generator" content="VitePress v1.2.3">
9+
<link rel="preload stylesheet" href="/laravel-wallet/assets/style.A34_PHSu.css" as="style">
10+
11+
<script type="module" src="/laravel-wallet/assets/app.CWErTm4J.js"></script>
12+
<link rel="preload" href="/laravel-wallet/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
13+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-LNEGT551DV"></script>
14+
<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date),gtag("config","G-LNEGT551DV");</script>
15+
<link rel="mask-icon" href="https://github.com/bavix/laravel-wallet/assets/5111255/f48a8e79-8a9d-469a-b056-b3d04835992d" color="#f4e664">
16+
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
17+
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
18+
</head>
19+
<body>
20+
<div id="app"></div>
21+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_fractional_deposit.md\":\"BWPIoLWk\",\"guide_events_customize.md\":\"C_oxTANW\",\"include_models_user_simple_float.md\":\"BHKtZpXH\",\"guide_additions_uuid.md\":\"BXhPbgHs\",\"guide_cqrs_create-wallet.md\":\"CKR5iFPX\",\"guide_introduction_installation.md\":\"BJr2yk7p\",\"guide_multi_new-wallet.md\":\"DLsWaElB\",\"guide_introduction_configuration.md\":\"BJtAQsgb\",\"guide_multi_transaction-filter.md\":\"MMWDhaAo\",\"guide_single_refresh.md\":\"DyIzlukO\",\"guide_single_deposit.md\":\"BcsDGgfM\",\"guide_events_balance-updated-event.md\":\"Bnwm6_qe\",\"guide_high-performance_batch-transactions.md\":\"CmHigNAE\",\"guide_single_exchange.md\":\"B2DS6fIk\",\"guide_single_credit-limits.md\":\"DlXxFDrQ\",\"guide_single_confirm.md\":\"C4zP6Jx7\",\"guide_single_cancel.md\":\"RROKg7vE\",\"guide_purchases_receiving.md\":\"CCQHkWGv\",\"guide_purchases_refund.md\":\"C91GQMAb\",\"include_models_user_simple.md\":\"DWW_tdne\",\"guide_db_transaction.md\":\"Buy64iJm\",\"include_composer.md\":\"Bahh6vzC\",\"guide_introduction_upgrade.md\":\"CWeACiVZ\",\"guide_fractional_transfer.md\":\"B0rpt3xh\",\"include_eager_loading.md\":\"DEcAtRed\",\"guide_purchases_payment-free.md\":\"Orz9kaX-\",\"guide_introduction_basic-usage.md\":\"8BCaXADC\",\"guide_introduction_index.md\":\"OLZq5yD4\",\"guide_purchases_payment.md\":\"CzAQICFL\",\"guide_events_wallet-created-event.md\":\"BSjxjF9u\",\"guide_single_withdraw.md\":\"DOQOK6kp\",\"index.md\":\"BjhejX_F\",\"guide_db_race-condition.md\":\"D79_peqX\",\"guide_high-performance_batch-transfers.md\":\"DnEd7m-y\",\"guide_db_atomic-service.md\":\"D5TpnOT6\",\"guide_purchases_gift.md\":\"C_bxgDhS\",\"guide_additions_swap.md\":\"CkbQXJmg\",\"guide_purchases_cart.md\":\"BQuTJc6v\",\"guide_events_transaction-created-event.md\":\"D2KSbfEY\",\"guide_helpers_formatter.md\":\"D75UEgM0\",\"guide_fractional_withdraw.md\":\"B7oZ_OTi\",\"guide_multi_transfer.md\":\"I6fyOpJ7\",\"guide_single_transfer.md\":\"C3u-1njA\",\"guide_purchases_commissions.md\":\"CMGOeeZc\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Laravel Wallet\",\"description\":\"Easy work with virtual wallet\",\"base\":\"/laravel-wallet/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"search\":{\"provider\":\"local\"},\"editLink\":{\"pattern\":\"https://github.com/bavix/laravel-wallet/edit/master/docs/:path\"},\"nav\":[{\"text\":\"Home\",\"link\":\"/\"},{\"text\":\"Guide\",\"link\":\"/guide/introduction/\"},{\"text\":\"Chat\",\"link\":\"https://t.me/laravel_wallet\"},{\"text\":\"Issues\",\"link\":\"https://github.com/bavix/laravel-wallet/issues\"},{\"text\":\"Discussions\",\"link\":\"https://github.com/bavix/laravel-wallet/discussions\"},{\"text\":\"Donate\",\"link\":\"https://opencollective.com/laravel-wallet\"}],\"sidebar\":[{\"text\":\"Getting started\",\"items\":[{\"text\":\"Introduction\",\"link\":\"/guide/introduction/\"},{\"text\":\"Installation\",\"link\":\"/guide/introduction/installation\"},{\"text\":\"Configuration\",\"link\":\"/guide/introduction/configuration\"},{\"text\":\"Basic Usage\",\"link\":\"/guide/introduction/basic-usage\"},{\"text\":\"Upgrade\",\"link\":\"/guide/introduction/upgrade\"}]},{\"text\":\"Single/Default Wallet\",\"items\":[{\"text\":\"Deposit\",\"link\":\"/guide/single/deposit\"},{\"text\":\"Withdraw\",\"link\":\"/guide/single/withdraw\"},{\"text\":\"Transfer\",\"link\":\"/guide/single/transfer\"},{\"text\":\"Refresh Balance\",\"link\":\"/guide/single/refresh\"},{\"text\":\"Confirm Transaction\",\"link\":\"/guide/single/confirm\"},{\"text\":\"Cancel Transaction\",\"link\":\"/guide/single/cancel\"},{\"text\":\"Exchange\",\"link\":\"/guide/single/exchange\"},{\"text\":\"Credit Limits\",\"link\":\"/guide/single/credit-limits\"}]},{\"text\":\"Multi Wallet\",\"items\":[{\"text\":\"New Wallet\",\"link\":\"/guide/multi/new-wallet\"},{\"text\":\"Transfer\",\"link\":\"/guide/multi/transfer\"},{\"text\":\"Transaction Filter\",\"link\":\"/guide/multi/transaction-filter\"}]},{\"text\":\"Fractional Wallet\",\"items\":[{\"text\":\"Deposit\",\"link\":\"/guide/fractional/deposit\"},{\"text\":\"Withdraw\",\"link\":\"/guide/fractional/withdraw\"},{\"text\":\"Transfer\",\"link\":\"/guide/fractional/transfer\"}]},{\"text\":\"Purchases\",\"items\":[{\"text\":\"Payment\",\"link\":\"/guide/purchases/payment\"},{\"text\":\"Payment Free\",\"link\":\"/guide/purchases/payment-free\"},{\"text\":\"Refund\",\"link\":\"/guide/purchases/refund\"},{\"text\":\"Gift\",\"link\":\"/guide/purchases/gift\"},{\"text\":\"Cart\",\"link\":\"/guide/purchases/cart\"},{\"text\":\"Commissions\",\"link\":\"/guide/purchases/commissions\"},{\"text\":\"Customize receiving\",\"link\":\"/guide/purchases/receiving\"}]},{\"text\":\"Database Transaction\",\"items\":[{\"text\":\"Atomic Service\",\"link\":\"/guide/db/atomic-service\"},{\"text\":\"Race Condition\",\"link\":\"/guide/db/race-condition\"},{\"text\":\"Transaction\",\"link\":\"/guide/db/transaction\"}]},{\"text\":\"Events\",\"items\":[{\"text\":\"Balance Updated\",\"link\":\"/guide/events/balance-updated-event\"},{\"text\":\"Wallet Created\",\"link\":\"/guide/events/wallet-created-event\"},{\"text\":\"Transaction Created\",\"link\":\"/guide/events/transaction-created-event\"},{\"text\":\"Customize\",\"link\":\"/guide/events/customize\"}]},{\"text\":\"Helpers\",\"items\":[{\"text\":\"Formatter\",\"link\":\"/guide/helpers/formatter\"}]},{\"text\":\"High performance api handles\",\"items\":[{\"text\":\"Batch Transactions\",\"link\":\"/guide/high-performance/batch-transactions\"},{\"text\":\"Batch Transfers\",\"link\":\"/guide/high-performance/batch-transfers\"}]},{\"text\":\"CQRS\",\"items\":[{\"text\":\"Create Wallet\",\"link\":\"/guide/cqrs/create-wallet\"}]},{\"text\":\"Additions\",\"items\":[{\"text\":\"Wallet Swap\",\"link\":\"/guide/additions/swap\"},{\"text\":\"Support UUID\",\"link\":\"/guide/additions/uuid\"}]}],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/bavix/laravel-wallet\"}],\"footer\":{\"message\":\"Released under the <a href=\\\"https://github.com/bavix/laravel-wallet/blob/master/LICENSE\\\">MIT License</a>.\",\"copyright\":\"Copyright © 2018-present <a href=\\\"https://github.com/rez1dent3\\\">Babichev Maksim</a>\"}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
22+
23+
</body>
24+
</html>

docs/.vitepress/dist/_include/composer.html

Lines changed: 27 additions & 0 deletions
Large diffs are not rendered by default.

docs/.vitepress/dist/_include/eager_loading.html

Lines changed: 43 additions & 0 deletions
Large diffs are not rendered by default.

docs/.vitepress/dist/_include/models/user_simple.html

Lines changed: 33 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)