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

GTHell's avatar

Is it bad to write everything in one HTML and use @include(' ') to include script and css?

I don't see anything wrong with this and also it make thing faster by just having one file.

Answer from the google did only mention about Readability and Cache. What else?

0 likes
3 replies
topvillas's avatar

No, i't's fine. Just split things out if your template starts getting too hairy and unmanageable.

mahesh_chinnala's avatar

Good way,it loads the blade faster and implementation would be easy in developing big projects.

Snapey's avatar

yes its bad. If you change the design you may have multiple files to edit.

keep your views DRY

@include is for including blade files, not other files like scripts and css.

Just use regular html tags etc

Please or to participate in this conversation.