Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs v2.0 #958

Merged
merged 10 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches: [master]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
# - uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
- name: Build with VitePress
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ laravel-wallet - Easy work with virtual wallet.

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

* **Vendor**: bavix
* **Package**: laravel-wallet
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
}
},
"scripts": {
"docs": "@php -S localhost:3000 -t ./docs",
"parabench":"@php ./vendor/bin/testbench package:test --coverage-xml=build/coverage-xml --log-junit=build/junit.xml",
"infect": "@php vendor/bin/infection --coverage=build --min-msi=50 -j$(nproc) --only-covering-test-cases",
"phpstan": ["@phpstan-src", "@phpstan-tests"],
Expand Down
Empty file removed docs/.nojekyll
Empty file.
1 change: 1 addition & 0 deletions docs/.vitepress/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cache/
152 changes: 152 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Laravel Wallet",
description: "Easy work with virtual wallet",
base: '/laravel-wallet/',
head: [
[
'script',
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-LNEGT551DV' }
],
[
'script',
{},
`window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-LNEGT551DV');`
],
[
'link', {
rel: 'mask-icon',
href: 'https://github.com/bavix/laravel-wallet/assets/5111255/f48a8e79-8a9d-469a-b056-b3d04835992d',
color: "#f4e664",
}
],
],
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
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>'
}
}
})
24 changes: 24 additions & 0 deletions docs/.vitepress/dist/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>404 | Laravel Wallet</title>
<meta name="description" content="Not Found">
<meta name="generator" content="VitePress v1.2.3">
<link rel="preload stylesheet" href="/laravel-wallet/assets/style.A34_PHSu.css" as="style">

<script type="module" src="/laravel-wallet/assets/app.CWErTm4J.js"></script>
<link rel="preload" href="/laravel-wallet/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-LNEGT551DV"></script>
<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date),gtag("config","G-LNEGT551DV");</script>
<link rel="mask-icon" href="https://github.com/bavix/laravel-wallet/assets/5111255/f48a8e79-8a9d-469a-b056-b3d04835992d" color="#f4e664">
<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>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"></div>
<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>

</body>
</html>
27 changes: 27 additions & 0 deletions docs/.vitepress/dist/_include/composer.html

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions docs/.vitepress/dist/_include/eager_loading.html

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions docs/.vitepress/dist/_include/models/user_simple.html

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions docs/.vitepress/dist/_include/models/user_simple_float.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/.vitepress/dist/assets/app.CWErTm4J.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Loading