Download the PHP package rawilk/laravel-stubs without Composer
On this page you can find all versions of the php package rawilk/laravel-stubs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rawilk/laravel-stubs
More information about rawilk/laravel-stubs
Files in rawilk/laravel-stubs
Package laravel-stubs
Short Description Opinionated modifications to the default Laravel stubs.
License MIT
Homepage https://github.com/rawilk/laravel-stubs
Informations about the package laravel-stubs
laravel-stubs
This repo contains opinionated versions of the Laravel stubs. The most notable changes are:
- migrations don't have a
down
function - controllers don't extend a base controller
- none of the model attributes are guarded
- use return type hints where possible
- most docblocks have been removed
declare(strict_types=1);
added to most files
Installation
You can install the package via composer:
If you want to keep your stubs up-to-date with every update, add this composer hook to your composer.json file:
Usage
You can publish the stubs using this command:
Usage in Packages
If you're developing a package, you may pull these stubs in to your package and generate them just like you would with a normal Laravel project. This is possible when used with Orchestral Canvas. On your package project, run the following command:
Next you need to run:
Finally, modify the generated canvas.yaml
file:
To generate a file, you can run the following command:
Running this would generate a migration normally, just like the php artisan make:migration
command would. For more information on canvas, please refer to their documentation.
Tip: Create an alias for composer exec canvas
in your profile to allow easier entering of your generator commands. I personally added the following alias to my bash profile:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- Randall Wilk
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-stubs with dependencies
laravel/framework Version ^9.0|^10.0|^11.0
spatie/laravel-package-tools Version ^1.13