laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.5k stars 11.01k forks source link

[Proposal] Minify/compress views #1449

Closed dgeorgiev closed 11 years ago

dgeorgiev commented 11 years ago

Hello everyone, This is my first Laravel project, I'm migrating from codeigniter, so before I decided to use Laravel for one project I checked first the codeigniter 3 beta, and I have found one feature that I miss in Laravel, to be able to set in config to automatically minify/compress all the views for better performance. I wanna ask you if there is a way to make it happen in Laravel 4, I have searched in packagist but I didn't found a package for this.

franzliedke commented 11 years ago

This question is probably better suited for the forums.

You can checkout Jason Lewis' Basset library, though.

dgeorgiev commented 11 years ago

I have checked but it is also for css/js assets, I'm asking for html compression directly from views I think is a good addition for speeding an app.

Anahkiasen commented 11 years ago

I think he means compressing the views, not the assets, not ?

WMeldon commented 11 years ago

This is mostly a moot point if you use gzip (which is a good idea), but it's a pretty trivial thing to do. See this example on how to do it.

dgeorgiev commented 11 years ago

Yes the views, not the assets. I'm using gzip but i think its even better with compresed html, I will check the example thanks.

taylorotwell commented 11 years ago

Probably not something we would be implementing at the framework level. A package could do it though.