jeremyworboys / containeraware
Adds ContainerAware and method injection functionality to Laravel 4
Installs: 5 335
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.4.0
- illuminate/support: 4.2.*
Requires (Dev)
- illuminate/container: 4.2.*
- phpunit/phpunit: 4.2.*
This package is auto-updated.
Last update: 2022-02-01 12:43:48 UTC
README
Introduction
ContainerAware adds a container aware interface, trait and base controller. The service provider will automatically inject an Illuminate\Container\Container
instance to anything with JeremyWorboys\ContainerAware\ContainerAware
interface.
The JeremyWorboys\ContainerAware\ContainerAwareController
also comes with some helper methods for retrieving services from the container and adds method injection into your Laravel 4 controller actions (exactly the same as Laravel 5).
Installation
Require this package with composer using the following command:
composer require jeremyworboys/containeraware
After updating composer, add the ServiceProvider to the providers array in app/config/app.php
'JeremyWorboys\ContainerAware\ContainerAwareServiceProvider',
License
ContainerAware is open-sourced software licensed under the MIT license