api-guard
api-guard copied to clipboard
adding to $routeMiddleware in Laravel 5.2
Hi Chris,
Just a little precision in your doc :
instead of
protected $routeMiddleware = [
...
'apiguard' => Chrisbjr\ApiGuard\Http\Middleware\ApiGuard::class,
];
I had to use :
protected $routeMiddleware = [
...
'apiguard' => \Chrisbjr\ApiGuard\Http\Middleware\ApiGuard::class,
];
Or it returns me a reflection error in Container.php.
Do you see what i mean ?
I have the same error, Can you help me please?
I am using ApiGuard in a Laravel 5.2 project, I followed the instalation guide but I get: ReflectionException in Container.php line 738: Class App\Http\Chrisbjr\ApiGuard\Http\Middleware\ApiGuard does not exist
I had the same problem, inconsistent use of \Chrisbjr probably due to classes being in new namespaces in Laravel v5 vs v4.