Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

axtg's avatar
Level 5

Splitting web app and front-end

Hi,

I'd like to once again pick your brain on something. I built a web app with Laravel/ Vue which is working out fine. However, I do notice I am getting annoyed with static pages (home page, contact, about us) being part of the one Laravel instance.

Static pages are hard to change and today require a GIT commit.

So I want to split the two. I see this plenty around, but am unsure about the setup. What is today the best approach to maintain static pages? And if the answer is a CMS, what would you recommend? OctoberCMS, PhotonCMS, Nuxt, Statamic?

Thanks.

0 likes
2 replies
lostdreamer_nl's avatar
Level 53

Most of my projects simply have their 'static' pages inside the DB.

Instead of installing a full blown CMS, simply add a Page model, add the needed migration, (title / slug / content / meta keywords / meta description, etc)

Create a route at the bottom (!! or it will become a catch all route) of your routes file like:

Route::get('/{page}', function($page) {
    $page = Page::where('slug', $page)->firstOrFail();
    return view('page', compact('page'));
});

And ofcourse, create the page view that will output the content.

Make a CRUD to edit them for the admins and you're done.

axtg's avatar
Level 5

I like how I've been building nothing but models, and not considered doing this. I'll be curious to see how localization works (for now I've added a locale column) in this setup.

Thanks.

Please or to participate in this conversation.