alexa-app
alexa-app copied to clipboard
Laravel 5.3 Issues
Have you done any testing with Laravel 5.3? I forked and updated the illuminate/routing
dependency to 5.3.*
and am able to get things in a mostly functional state.
The largest issue I've run into so far is that it doesn't appear that routes are being created with the attributes from their parent group. I have a Route::group
statement with a route prefix and namespace defined in my RouteServiceProvider.php
file, which then includes a file containing an AlexaRoute
route. That route is returning a 404 when attempting to access the route including the prefix, but working when defining the AlexaRoute
with the prefix. When not including the namespace that was already defined on the group the route also returns an error.
For example with this group in my route service provider:
Route::group([
'middleware' => 'integrations',
'namespace' => $this->namespace . '\Integrations',
'prefix' => 'integrations',
'as' => 'integrations.',
], function ($router) {
require base_path('routes/integrations.php');
});
This configuration does not work:
AlexaRoute::intent('alexa', 'intent', 'AlexaController@intent');
While this configuration does work:
AlexaRoute::intent('integrations/alexa', 'intent', 'App\Http\Controllers\Integrations\AlexaController@intent');
I'm very very sorry it's taken me so long to get back to this.
A quick question: Just to make sure I'm understanding, you're saying that if you use the full class path then the issue you are calling out is resolved?
Thank you, and sorry again!
The issue is that none of the parameters from the route group are applying to the AlexaRoute (including 'prefix', 'as', as well as 'namespace') and have to be defined again on every route. I'm able to get the prefix to work by adding the required class path information directly to the AlexaRoute (like the full class path there) rather than on the route group. I also have to add the prefix and name information to every individual route as well.
I think I might have run into some other issues with 5.3 and/or php7, I was trying to do some digging but haven't had a chance to work on the project in a while. Hoping to get back into it soon, will attempt to fix some things or at least open issues for anything I find.
do you find that you need the middleware to make this work?