HansSchouten / Laravel-Pagebuilder

A drag and drop pagebuilder to manage pages in any Laravel project
https://www.phpagebuilder.com
MIT License
783 stars 182 forks source link

how to direct my old routes #3

Closed alifu closed 4 years ago

alifu commented 4 years ago

HI, can you explain how to use routes? because all my route is going to phpagebuilder routes

HansSchouten commented 4 years ago

Currently the package by default relies on routes from the pages table. This is handled in PHPageBuilder\Modules\Router\DatabasePageRouter which you could also replace by implementing RouterContract and adding your custom router class to the pagebuilder config file. I see now that at the moment it is not possible to break out of this and use your existing Laravel routes (see how all types of routes are handled in PHPageBuilder\PHPageBuilder->handleRequest()). I guess it is desirable to be able to disable the DatabasePageRouter altogether, which allows the original Laravel routes to be evaluated, or what are you trying to achieve?

HansSchouten commented 4 years ago

I just created a new release with a use_router setting for disabling the default PHPageBuilder router. If you set router > use_router to false, all standard Laravel routes are evaluated.