A better alternative for laravel view composers

Submitted by imanghafoori - 5 months ago

View composers are nice but they have some problems accocsiated with them. 1- you never know where the data is coming from when you look at your html 2- They offer no easy way of caching the result. You can use the "widget pattern" to have much better performance and structure in your apps + many more bonuses ! :)

www.github.com/imanghafoori1/laravel-widgetize

Ads cover the costs of maintaining Laravel-tricks

comments powered by Disqus

Ads cover the costs of maintaining Laravel-tricks