PHP code example of zuqongtech / laravel-anvil

1. Go to this page and download the library: Download zuqongtech/laravel-anvil library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zuqongtech / laravel-anvil example snippets


// config/anvil.php
'openapi' => ['docs' => ['asset_base' => '/api-docs/v1/assets']],
bash
php artisan anvil:forge:app-scaffold --models --schema=all
php artisan anvil:forge-webapp --stack=livewire
bash
php artisan anvil:forge:app-scaffold --refresh-models
bash
php artisan anvil:forge:app-scaffold [schemas...] [options]
bash
php artisan anvil:forge-api [options]
bash
php artisan anvil:forge-apidocs [options]
bash
php artisan anvil:forge-apidocs --check               # what exists?
php artisan anvil:forge-apidocs --all-versions --force
php artisan anvil:forge-apidocs --check --strict      # fail a build on a missing spec
bash
php artisan anvil:forge-webapp [options]
bash
php artisan anvil:forge-auth [options]
bash
php artisan anvil:forge-graphql [options]
bash
php artisan anvil:forge-client [options]
bash
php artisan anvil:doctor [options]
bash
php artisan anvil:diff [options]
bash
php artisan anvil:diff              # human-readable plan
php artisan anvil:diff --strict     # CI gate
php artisan anvil:diff --accept     # record the baseline, generate nothing
bash
php artisan anvil:docs-sync [model...] [options]
bash
php artisan anvil:polish [options]
bash
php artisan anvil:polish                   # fix everything installed
php artisan anvil:polish --test --strict   # CI gate
php artisan anvil:polish --audit           # only the schema/model audit
php artisan anvil:polish --publish-config  # write rector.php / pint.json
bash
php artisan anvil:frontend [options]
bash
php artisan anvil:frontend --install --stack=livewire
php artisan anvil:forge-webapp --stack=livewire
bash
php artisan anvil:install:swagger-ui [options]
bash
php artisan anvil:install:swagger-ui --source=http      # skip npm entirely
php artisan anvil:install:swagger-ui --timeout=1800     # slow link
npm install --no-save [email protected] \
  && php artisan anvil:install:swagger-ui --source=local
bash
php artisan anvil:doctor                                     # is the schema generatable?
php artisan anvil:forge:app-scaffold --models --schema=all   # models first, always
php artisan anvil:forge-api --api-version=1 --dry-run        # preview
php artisan anvil:forge-api --api-version=1 --force