millancore / ladoc
Console tool for explore Laravel Documentation
Requires
- php: ^8.2
- ext-curl: *
- ext-dom: *
- ext-libxml: *
- league/commonmark: ^2.4
- nunomaduro/termwind: ^1.15
- symfony/console: ^6.3
- symfony/process: ^6.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.20
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.2
- symfony/var-dumper: ^6.3
README
Ladoc allows you to search and browse Laravel documentation in all its versions.
Installation
Using Composer
Requires PHP 8.2
composer global require "millancore/ladoc"
or Using Docker
docker run -td --name ladoc millancore/ladoc
Uses:
docker exec -it ladoc sh # (and then zz or ladoc)
Usage
Tip: To make it easier to use, create an alias, I usually use
zz
.
Search
ladoc <section> <query>
ladoc blade @once
List all sections
simply execute the command without parameters, you will see a list of all the sections (in brackets).
ladoc
Result:
Main List
• [0] Artisan Console (artisan)
• [1] Authentication (authentication)
• [2] Authorization (authorization)
• [3] Laravel Cashier (Stripe) (billing)
• [4] Blade Templates (blade)
...
Filter Main List
To simplify the navigation you can filter main list with '--letter' or -l
and initial letter.
ladoc -lv
Result:
Main List | filter: V
• [0] Validation (validation)
• [1] Views (views)
Navigation System
You can navigate through all sections using the indexes in the list.
ladoc 4
Result:
Blade Templates
• [0] Introduction (+)
• [1] Displaying Data (+)
• [2] Blade Directives (+)
...
and continue in that way
ladoc 4 2
Result:
Blade Directives
In addition to template inheritance and displaying data...
────────────────────────
• [0] If Statements
• [1] Switch Statements
• [2] Loops
• [3] The Loop Variable
...
Using the search with index
You can search directly in a section using its index. ladoc 4 @once
it's equal to ladoc blade @once
.
Versions
Ladoc allows you to search all versions of Laravel, just use --branch
or -b
to define the version you want to use.
ladoc -b5.2 blade
If no version is set, use the latest one.
Ladoc is an open-sourced software licensed under the MIT license.