PHP code example of mikegarde / laravel-route-docs

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

    

mikegarde / laravel-route-docs example snippets


use RouteDocs\Attributes\get;

class ItemController
{
    #[get('/items', name: 'items.index')]
    public function index()
    {
        return Item::all();
    }
}
bash
php artisan route:docs
bash
php artisan route:docs:validate