https://github.com/spatie/laravel-stubs
The default Laravel stubs modified to our liking
https://github.com/spatie/laravel-stubs
development laravel php stubs
Last synced: about 1 year ago
JSON representation
The default Laravel stubs modified to our liking
- Host: GitHub
- URL: https://github.com/spatie/laravel-stubs
- Owner: spatie
- License: mit
- Created: 2020-03-21T21:57:52.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-02-20T11:10:53.000Z (over 1 year ago)
- Last Synced: 2025-04-14T02:58:19.626Z (about 1 year ago)
- Topics: development, laravel, php, stubs
- Language: PHP
- Homepage: https://spatie.be/open-source
- Size: 103 KB
- Stars: 244
- Watchers: 3
- Forks: 40
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Opinionated Laravel stubs
[](https://packagist.org/packages/spatie/laravel-stubs)
[](https://github.com/spatie/laravel-stubs/actions/workflows/run-tests.yml)
[](https://packagist.org/packages/spatie/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
## Support us
[
](https://spatie.be/github-ad-click/laravel-stubs)
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
## Exploring laravel-stubs
In this [video on YouTube](https://www.youtube.com/watch?v=I-y-VSOL93I), Povilas Korop explores our package.
## Installation
You can install the package via composer:
```bash
composer require spatie/laravel-stubs --dev
```
If you want to keep your stubs up to date with every update, add this composer hook to your composer.json file:
```json
"scripts": {
"post-update-cmd": [
"@php artisan spatie-stub:publish --force"
]
}
```
## Usage
You can publish the stubs using this command:
```bash
php artisan spatie-stub:publish
```
## Testing
``` bash
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.
## Security
If you've found a bug regarding security please mail [security@spatie.be](mailto:security@spatie.be) instead of using the issue tracker.
## Credits
- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.