They Are Many

In a complex Laravel application I'm working on, I had to implement a dynamic system to integrate external and heterogeneous sources of data. So I built on the ServiceProviders feature provided by Laravel and created a ContentsDriver abstract class including the internal events handling flow and to be extended by…

Assets Minification Salt and Pepper

Recently I discovered this awesome Laravel module to minify and aggregate assets. My only issue was about generated hashes for aggregated files: as I had to distribute the files on different balanced servers I could not depend on mtime timestamps to salt them (as last git pull time could slightly…

Transparent Caching of Eloquent Models

In a Laravel application I had to iterate a large set of items and, for each of them, access to a related other item which, in most cases, is selected within a smaller set. The reference example: a lot of food products, each having a unit measure such as "…

Cookies from the Dark Side

I spent some hour trying to get Laravel and Varnish live together peacefully, and mixing various sources from the web I obtained some result. The base issue is that Laravel drops a session cookie for every users, even when not authenticated, and this fools any evaluation about pass/hash contents…