Download the PHP package kmuenkel/route-injection without Composer
On this page you can find all versions of the php package kmuenkel/route-injection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package route-injection
Route Injection Bindings
Inspired by Laravel's Route Model Binding, this package takes that a step further, and allows for Controller method injection of any object type.
- Activate the
RouteInjection\Providers]RouteInjectionServiceProvider
by either adding it to yourapp.php
config, or making sure yourcomposer.json
file includes the@php artisan package:discover --ansi
script. - Create a class designed to parse an incoming
Request
and produce a concrete object that will be injected into the controller. To do this, simply extend theRouteInjection\Binder
class. - Reference your custom
Binder
class name in theroute-injection
config array. - Ensure that your routes leverage Laravel's
SubstituteBindings
middleware. This should be automatic in your 'api' and 'web' routes, but any outside of these groups may need to have it explicitly listed among its middleware configs.
All versions of route-injection with dependencies
PHP Build Version
Package Version
Requires
illuminate/routing Version
^7.0|^8.0
illuminate/http Version ^7.0|^8.0
illuminate/support Version ^7.0|^8.0
illuminate/http Version ^7.0|^8.0
illuminate/support Version ^7.0|^8.0
The package kmuenkel/route-injection contains the following files
Loading the files please wait ....