laravel-lost-interfaces
, (*1)
If you've used the Laravel framework for a while, you may have noticed that the common convention is to add certain
methods that will magically get called at some point., (*2)
Common examples are console commands that should have a handle()
method, middleware that should have a handle()
method, and so on., (*3)
This can get pretty annoying since you need to look up the correct method names and their signatures from the
documentation. Not having interfaces also makes it harder to use your IDE to find which classes implement some
functionality (e.g. finding all event subscribers to ensure you've actually registered all of them)., (*4)
This library provides some of these missing interfaces., (*5)
Installation
composer require jalle19/laravel-lost-interfaces
Usage
Just implement the interfaces you need. The following list shows the currently available interfaces:, (*6)
src/
โโโ Console
โย ย โโโ Command.php
โโโ Events
โย ย โโโ Subscriber.php
โโโ Http
โย ย โโโ Middleware
โย ย โย ย โโโ Middleware.php
โย ย โโโ Requests
โย ย โโโ FormRequest.php
โโโ Mail
โย ย โโโ Buildable.php
โโโ Providers
โโโ ServiceProvider.php
Contributing
If you feel like some interface is missing, feel free to make a pull request. Remember to update the list in the
README using tree src/
., (*7)
License
MIT, (*8)