lpcdernoncourt / annotations
Route Annotations for The Laravel Framework.
v5.5.1
2017-11-20 18:45 UTC
Requires
- php: >=7.0.0
- doctrine/annotations: ~1.0
- illuminate/console: 5.5.*
- illuminate/filesystem: 5.5.*
- illuminate/support: 5.5.*
Requires (Dev)
- illuminate/database: 5.5.*
- mockery/mockery: ~0.9.4
- phpunit/phpunit: ~5.4
README
To Laravel 5.5
Official documentation for Annotations for The Laravel Framework can be found at the LaravelCollective website.
Installation
Add Presenter to your composer.json file:
"require": { "lpcdernoncourt/annotations": "5.5.*" }
Now, run a composer update on the command line from the root of your project:
composer update
Once composer is done, you'll need to create a Service Provider in app/Providers/AnnotationsServiceProvider.php.
<?php namespace App\Providers; use Collective\Annotations\AnnotationsServiceProvider as ServiceProvider; class AnnotationsServiceProvider extends ServiceProvider { /** * The classes to scan for event annotations. * * @var array */ protected $scanEvents = []; /** * The classes to scan for route annotations. * * @var array */ protected $scanRoutes = []; /** * The classes to scan for model annotations. * * @var array */ protected $scanModels = []; /** * Determines if we will auto-scan in the local environment. * * @var bool */ protected $scanWhenLocal = false; /** * Determines whether or not to automatically scan the controllers * directory (App\Http\Controllers) for routes * * @var bool */ protected $scanControllers = false; /** * Determines whether or not to automatically scan all namespaced * classes for event, route, and model annotations. * * @var bool */ protected $scanEverything = false; }
Registering the Package
Include the service provider within app/config/app.php
. The service povider is needed for the generator artisan command.
'providers' => [ // ... App\Providers\AnnotationsServiceProvider::class // ... ];