PHP code example of rakutentech / laravel-request-docs

1. Go to this page and download the library: Download rakutentech/laravel-request-docs 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/ */

    

rakutentech / laravel-request-docs example snippets


    /**
     * @lrd:start
     * # Hello markdown
     * Free `code` or *text* to write documentation in markdown
     * @lrd:end
     */
    public function index(MyIndexRequest $request): Resource
    {

    /**
     * @LRDparam username string|max:32
     * // either space or pipe
     * @LRDparam nickaname string|nullable|max:32
     * // override the default response codes
     * @LRDresponses 200|422
     */
    public function index(MyIndexRequest $request): Resource
    {
bash
php artisan vendor:publish --tag=request-docs-config
php artisan route:cache

# Optional publish assets
# php artisan vendor:publish --tag=request-docs-assets
bash
./vendor/bin/php-cs-fixer fix src/
./vendor/bin/php-cs-fixer fix config/