thedoctor0 / laravel-stubs
Opinionated versions of the Laravel stubs for Artisan make commands
v2.0.0
2026-08-10 12:23 UTC
Requires
- php: ^8.2
- laravel/framework: ^11.0|^12.0|^13.0
Requires (Dev)
- orchestra/testbench: ^9.0|^10.0|^11.0
- phpunit/phpunit: ^10.5|^11.5|^12.0
This package is auto-updated.
Last update: 2026-08-10 13:52:00 UTC
README
This package contains opinionated versions of the Laravel stubs for Artisan make commands.
Version support
| Package | Laravel | PHP |
|---|---|---|
| 2.x | 11.x, 12.x, 13.x | 8.2+ |
| 1.x | 8.x | 7.4+ |
Changes
strict_typesare declared by default- return type hints are present where possible
- missing parameter type hints have been added
- migrations use anonymous classes and don't have a
downfunction - the model stub ships a
casts()method - form requests don't have an
authorizefunction - extra stubs Laravel doesn't publish: enums, plain classes, traits, scopes, inbound casts, singleton controllers, and Pest tests
Installation
You can install the package via composer:
composer require thedoctor0/laravel-stubs --dev
If you want to keep stubs up to date, add this hook to your composer.json file:
"scripts": { "post-update-cmd": [ "@php artisan stubs:publish --force" ] }
Usage
You can publish the stubs using this command:
php artisan stubs:publish
Already-published stubs are skipped unless you pass --force.
Testing
composer test
Credits
License
The MIT License (MIT). Please see license file for more information.