add middleware for the admin panel routes
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!
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
add middleware for the admin panel routes
Hello,
How can I add a middleware for the admin panel routes?
Do I need to copy the admin routers in the aimeos vendor files to my web route?
How can I add a middleware for the admin panel routes?
Do I need to copy the admin routers in the aimeos vendor files to my web route?
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Re: add middleware for the admin panel routes
@aimeos help me please!
Re: add middleware for the admin panel routes
Just add the middleware name here:
https://github.com/aimeos/aimeos/blob/m ... hop.php#L9
https://github.com/aimeos/aimeos/blob/m ... hop.php#L9
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
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Re: add middleware for the admin panel routes
ok, now if I want to add a middleware for the checkout route, how can I do?
I tried to add it to this line, but shop page will affected.
https://github.com/aimeos/aimeos/blob/9 ... op.php#L38
I tried to add it to this line, but shop page will affected.
https://github.com/aimeos/aimeos/blob/9 ... op.php#L38
Re: add middleware for the admin panel routes
This is correct because the checkout route is part of the "default" group:
https://github.com/aimeos/aimeos-larave ... #L199-L226
https://github.com/aimeos/aimeos-larave ... #L199-L226
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
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Re: add middleware for the admin panel routes
Ok. that woks. But the "/shop" page affected with the middelware.aimeos wrote: ↑19 Jul 2022, 04:49 This is correct because the checkout route is part of the "default" group:
https://github.com/aimeos/aimeos-larave ... #L199-L226
I add "auth" middleware for the route "default", now you need to login before browsing the "/shop" page.
Re: add middleware for the admin panel routes
You can disable the "default" routes and add them to your ./routes/web.php with different middlewares instead.
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
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Re: add middleware for the admin panel routes
ok, that's good. thanks.