Change the route to the Aimeos admin panel
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Change the route to the Aimeos admin panel
Hello,
[*]aimeos/ai-laravel v.2023.10.4, Laravel v.10.43.0, PHP v.8.1.27, MacOS 14.2
I want to add aimeos-laravel to an existing project. I already have my own admin panel in the project. Can I change the route to the Aimeos admin panel from /admin to another one, like /wm-shop, in the Aimeos settings?
Best regards.
[*]aimeos/ai-laravel v.2023.10.4, Laravel v.10.43.0, PHP v.8.1.27, MacOS 14.2
I want to add aimeos-laravel to an existing project. I already have my own admin panel in the project. Can I change the route to the Aimeos admin panel from /admin to another one, like /wm-shop, in the Aimeos settings?
Best regards.
Re: Change the route to the Aimeos admin panel
Hi
You have to overwrite this line to your configuration file.
https://github.com/aimeos/aimeos-larave ... op.php#L16
You have to overwrite this line to your configuration file.
https://github.com/aimeos/aimeos-larave ... op.php#L16
Re: Change the route to the Aimeos admin panel
Thanks Gagik!
Uncommented and vaporized:
Now I have the correct route:
But I still get to the route: /wm-admin (this is my dashboard), by the way, this is my HOME in my RouteServiceProvider:
Best Regards
Uncommented and vaporized:
Code: Select all
'admin' => ['prefix' => 'wm-shop', 'middleware' => ['web']],
Code: Select all
GET|HEAD wm-shop ...aimeos_shop_admin › Aimeos\Shop › AdminController@indexAction
Code: Select all
class RouteServiceProvider extends ServiceProvider
{
public const HOME = '/wm-admin';
Re: Change the route to the Aimeos admin panel
There may be another one here you have to change:
https://github.com/aimeos/aimeos/blob/2 ... er.php#L32
Also make sure your change the prefix for these routes too to avoid interfering with your other /admin routes:
https://github.com/aimeos/aimeos/blob/2 ... php#L9-L11
https://github.com/aimeos/aimeos/blob/2 ... er.php#L32
Also make sure your change the prefix for these routes too to avoid interfering with your other /admin routes:
https://github.com/aimeos/aimeos/blob/2 ... php#L9-L11
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Change the route to the Aimeos admin panel
Thanks for the help,
Performed by:
https://github.com/aimeos/aimeos-larave ... op.php#L16
https://github.com/aimeos/aimeos/blob/6 ... php#L9-L11
Now I have the following routes:
Didn't understand what to change here: <<<<
https://github.com/aimeos/aimeos/blob/6 ... er.php#L32
But I couldn't find where the redirect from /wm-shop (Aimeos admin) to /wm-admin (site admin) comes from.
Best Regards
Performed by:
https://github.com/aimeos/aimeos-larave ... op.php#L16
https://github.com/aimeos/aimeos/blob/6 ... php#L9-L11
Now I have the following routes:
Code: Select all
GET|HEAD wm-shop..................................... aimeos_shop_admin › Aimeos\Shop › AdminController@indexAction
POST wm-shop/{site}/graphql...................... aimeos_shop_graphql_post › Aimeos\Shop › GraphqlController@indexAction
POST wm-shop/{site}/jqadm/batch/{resource}....... aimeos_shop_jqadm_batch › Aimeos\Shop › JqadmController@batchAction
GET|POST|HEAD wm-shop/{site}/jqadm/copy/{resource}/{id}... aimeos_shop_jqadm_copy › Aimeos\Shop › JqadmController@copyAction
GET|POST|HEAD wm-shop/{site}/jqadm/create/{resource}...... aimeos_shop_jqadm_create › Aimeos\Shop › JqadmController@createAction
POST wm-shop/{site}/jqadm/delete/{resource}/{id?}.... aimeos_shop_jqadm_delete › Aimeos\Shop › JqadmController@deleteAction
GET|POST|HEAD wm-shop/{site}/jqadm/export/{resource}...... aimeos_shop_jqadm_export › Aimeos\Shop › JqadmController@exportAction
GET|HEAD wm-shop/{site}/jqadm/file/{type}............ aimeos_shop_jqadm_file › Aimeos\Shop › JqadmController@fileAction
GET|HEAD wm-shop/{site}/jqadm/get/{resource}/{id}.... aimeos_shop_jqadm_get › Aimeos\Shop › JqadmController@getAction
POST wm-shop/{site}/jqadm/save/{resource}........ aimeos_shop_jqadm_save › Aimeos\Shop › JqadmController@saveAction
GET|POST|HEAD wm-shop/{site}/jqadm/search/{resource}...... aimeos_shop_jqadm_search › Aimeos\Shop › JqadmController@searchAction
OPTIONS wm-shop/{site}/jsonadm/{resource?}.......... aimeos_shop_jsonadm_options › Aimeos\Shop › JsonadmController@optionsAction
DELETE wm-shop/{site}/jsonadm/{resource}/{id?}..... aimeos_shop_jsonadm_delete › Aimeos\Shop › JsonadmController@deleteAction
GET|HEAD wm-shop/{site}/jsonadm/{resource}/{id?}..... aimeos_shop_jsonadm_get › Aimeos\Shop › JsonadmController@getAction
PATCH wm-shop/{site}/jsonadm/{resource}/{id?}..... aimeos_shop_jsonadm_patch › Aimeos\Shop › JsonadmController@patchAction
POST wm-shop/{site}/jsonadm/{resource}/{id?}..... aimeos_shop_jsonadm_post › Aimeos\Shop › JsonadmController@postAction
PUT wm-shop/{site}/jsonadm/{resource}/{id?}..... aimeos_shop_jsonadm_put › Aimeos\Shop › JsonadmController@putAction
https://github.com/aimeos/aimeos/blob/6 ... er.php#L32
Code: Select all
public static function home()
{
if( config( 'app.shop_registration' ) ) {
return route('aimeos_shop_admin');
}
return airoute( 'aimeos_shop_account' );
}
Best Regards
Re: Change the route to the Aimeos admin panel
This was recently changed from "/admin" to return "route('aimeos_shop_admin')" so it's not a fixed string.iwpress wrote: ↑05 Feb 2024, 21:41 https://github.com/aimeos/aimeos/blob/6 ... er.php#L32Code: Select all
public static function home() { if( config( 'app.shop_registration' ) ) { return route('aimeos_shop_admin'); } return airoute( 'aimeos_shop_account' ); }
The redirect after the login check is done here:
https://github.com/aimeos/aimeos-larave ... roller.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Change the route to the Aimeos admin panel
Thank you very much for your detailed response.
I'll be looking into it.
Regards
I'll be looking into it.
Regards
Re: Change the route to the Aimeos admin panel
Hi,
I edited the line in config/shop.php:
So far, I can't find a way to call the Aimeos admin panel if a project has its own admin panel, no matter what its route is.
Best Regards
I installed aimeos-laravel on an existing project and didn't find this RouteServiceProvider here. It is in the aimeos package.This was recently changed from "/admin" to return "route('aimeos_shop_admin')" so it's not a fixed string.
I looked through the AdminController and found here:The redirect after the login check is done here:
https://github.com/aimeos/aimeos-larave ... roller.php
Code: Select all
$param = array(
'resource' => config( 'shop.panel', 'dashboard' ),
Code: Select all
'panel' => 'wm-shop', // panel shown in admin backend after login
Best Regards