Combining Model Observers and Cache Tags for very simple but elegant automatic cache flushing on Eloquent Model updates. Can handle both a Model and its Relations easily!
I have a legacy system that uses SHA1 for passwords as opposed to bcrypt, which is used by Laravel. For now, I need people to be able to access through both systems. I use the auth.attempt event to handle password conversion.
Use this trick to log queries using Monolog.
Add this to your routes.php and log straight into your Firebug console. Firebug needs the FirePHP add-on.
- kisses Netbulae
I have added a sitemap to this very site and was thinking that some of you want to do the same for SEO purposes. The way to add a sitemap would be pretty easy by using a Blade template for the XML that sitemap requires but there is an easier solution. You can use a package from https://github.com/RoumenDamianoff/laravel4-sitemap that would make it super simple to generate a sitemap for your Laravel application. See for yourself.
I spent a good hour trying to figure out why my Eloquent relationship wasn't working when I found out it was because of the difference between `$model->relationship->value` and `$model->relationship()->value`.
I have put together a custom collection that will allow you to access a relationship on all objects in a collection. You can also run a method from an object in the collection on the entire collection such has touch or delete.