/laravel-stubs

Opinionated versions of the Laravel stubs for Artisan.

Primary LanguagePHPMIT LicenseMIT

Laravel Stubs

Build Status Packagist Packagist License

This package contains opinionated versions of the Laravel 7.x (and later) stubs for Artisan make commands.

Changes

  • strict_types are declared by default
  • return type hints are present where possible
  • missing parameter type hints have been added
  • all classes are final
  • migrations don't have a down function
  • form requests don't have authorize function

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

Testing

composer test

Credits

License

The MIT License (MIT). Please see license file for more information.