jurito
jurito

I'm experimenting with OctoberCms and I am wondering if and how is possible to have a custom laravel router ( a routes.php with routes+controller bindings created from a db table ) and still be able to render views/partials/components. The only alternative i found is requiring TwigBridge ( not a blade fan ) and rendering via basic laravel but i'd like to know if there's a more octoberish way :)

Maybe creating a page object programmatically?

TIA for your attention.

philipptempel
philipptempel

I think an october'ish way would be to create a CMS page that matches the /:uri* route and has one component inside. This component then renders the page's content. Of course, you could enable dynamic code such that store the onStart() function's body inside a database table and process it on each request. Alternatively, you can just read the docs which shows how to use basic Laravel routes.php with custom controllers. From this point on its pure Laravel again (yet with most of the power of October).

jurito
jurito

thanks for your answer! actually i'm experimenting with the pure laravel approach from the router on and i find it extremely interesting.

OctoberCms is such an amazing project, simple for the beginner yet ultra powerful for the advanced user. Good job guys, keep on with the great work!

1-3 of 3