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

anatomic's avatar

Include css, js and php files within an existing app

Hi

I've got some old webpages that have a few css files, a few js files and mulitple php files. I'm in the process of rebuilding it all (as a total learner) but planned to move all the current pages into the views folder, then move the css and js to the public folder and then create a new folder in views for the php files and include them like partials, would this be a good way? Is there an easier way please?

Hope that makes sense - thanks.

0 likes
2 replies
jlrdw's avatar

Laravel has partials, so should work, but of course depending on how used. Are you converting them to blade.

anatomic's avatar

Yes and no. I'll be making a layout, but it'll not be using eloquent, I'm planning on keeping the old mysqli connection include as well as other old files just to keep it moving on a temporary basis..

It's all old code that is a mess (including bad DB structure) and will all eventually go in the bin. This is a temporary solution, so I'm looking for the easiest and with the least time spent!

Thanks!

Please or to participate in this conversation.