We’re currently experiencing a high volume of inquiries and our response time could be up to 2 days. We apologize for the delay, and thank you for your patience. Our available time: 2 AM - 1 PM (Monday - Friday) (UTC+0 Timezone).
It became necessary to use the main Laravel routing file - /routes/web.php I want routes from it to be loaded earlier than routes from Botble CMS themes and plugins. How to do that?
Very bad. This is a big mistake in the architecture of the application. Normal people have only one template on the site. And the ability to change themes on one site is useless. Moreover, it makes the system incompatible with normal Blade templates. A very stupid solution.
But what about BASE_FILTER_GROUP_PUBLIC_ROUTE ? What about $this->loadRoutesFrom(__DIR__.'/.../routes/web.php');
It became necessary to use the main Laravel routing file - /routes/web.php
I want routes from it to be loaded earlier than routes from Botble CMS themes and plugins. How to do that?
Hi,
You can't make routes/web.php load first.
Routes in platform/themes/[your-theme]/routes/web.php will be loaded first.
If you want to override the default routes, you can put your custom routes in theme routes.
Very bad. This is a big mistake in the architecture of the application. Normal people have only one template on the site. And the ability to change themes on one site is useless. Moreover, it makes the system incompatible with normal Blade templates. A very stupid solution.
But what about BASE_FILTER_GROUP_PUBLIC_ROUTE ?
What about $this->loadRoutesFrom(__DIR__.'/.../routes/web.php');
Hi,
That's the best solution we can do.
Routes from theme always the first priority.
BASE_FILTER_GROUP_PUBLIC_ROUTE is used to hook filters before route loaded.
$this->loadRoutesFrom(__DIR__.'/.../routes/web.php'); is used to load route from path.
Why do you want to load routes from routes/web.php first?
I want to use usual blade templates, stored in resources/views/ and use
instead of
Hi,
You can use view('path to view'); as normal Laravel application but it won't extends theme layouts.
We're building theme like this package https://github.com/FaCuZ/laravel-theme
So we need to use Theme::scope() to call view with theme layout.
Ок. I just cleared theme routes file. But what to do with plugin routes? Clean up as well.
For example, member plugin force to use it ugly form of login for /login route.
You can change routes for plugin member in /platform/plugins/member/routes/web.php
For login form, platform/plugins/member/resources/views/auth/login.blade.php
ok