Ladoc allows you to search and browse Laravel documentation in all its versions.
Requires PHP 8.2
composer global require "millancore/ladoc" docker run -td --name ladoc millancore/ladocUses:
docker exec -it ladoc sh # (and then zz or ladoc)Tip: To make it easier to use, create an alias, I usually use
zz.
ladoc <section> <query>
ladoc blade @oncesimply execute the command without parameters, you will see a list of all the sections (in brackets).
ladocResult:
Main List
• [0] Artisan Console (artisan)
• [1] Authentication (authentication)
• [2] Authorization (authorization)
• [3] Laravel Cashier (Stripe) (billing)
• [4] Blade Templates (blade)
...
To simplify the navigation you can filter main list with '--letter' or -l and initial letter.
ladoc -lvResult:
Main List | filter: V
• [0] Validation (validation)
• [1] Views (views)
You can navigate through all sections using the indexes in the list.
ladoc 4Result:
Blade Templates
• [0] Introduction (+)
• [1] Displaying Data (+)
• [2] Blade Directives (+)
...
and continue in that way
ladoc 4 2Result:
Blade Directives
In addition to template inheritance and displaying data...
────────────────────────
• [0] If Statements
• [1] Switch Statements
• [2] Loops
• [3] The Loop Variable
...
You can search directly in a section using its index. ladoc 4 @once it's equal to ladoc blade @once.
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 bladeIf no version is set, use the latest one.
Ladoc is an open-sourced software licensed under the MIT license.
