Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#4803 by tkristis
23 Oct 2017, 19:30
Hi, I can't find aimeos routes.
Where are location of aimeos routes?

I'm using latest version of aimeos.

Thanks for help!
#4814 by tkristis
25 Oct 2017, 09:53
So if I want to change product listing page name instead "list" to "products" how I could do that?
#4816 by aimeos
25 Oct 2017, 10:25
Laravel allows you to overwrite routes in the routes/web.php file. Might be something like this:
Code: Select allRoute::group(config('shop.routes.default', ['middleware' => ['web']]), function() {
   Route::match( array( 'GET', 'POST' ), 'products', array(
      'as' => 'aimeos_shop_list',
      'uses' => 'Aimeos\Shop\Controller\CatalogController@listAction'
   ));
});

But I'm not 100% sure. If this doesn't work, please ask in the Laravel forums for help.
#4817 by tkristis
25 Oct 2017, 11:18
I get "CatalogController does not exist" error, but thanks I will try to figure it out.
#4854 by tkristis
30 Oct 2017, 11:32
I found a solution.

In config/app.php in the providers array put the service provider of the package before App\Providers\RouteServiceProvider::class, and then in your web.php routes you'll be able to override it with your custom route.

Also need to change route code and add slash.
Instead this:
Code: Select all'uses' => 'Aimeos\Shop\Controller\CatalogController@listAction'


Do this:
Code: Select all'uses' => '\Aimeos\Shop\Controller\CatalogController@listAction'


https://stackoverflow.com/questions/44723747/laravel-5-4-how-to-override-route-defined-in-a-package?rq=1