laravel/framework — pull request #415 by hailwood (2013-02-23 12:41:34+00:00)
Title: Fixes where('column', null) generating incorrect sql in query builder.

Let's say you want to filter your users, based on a column that is either a string value, or `null` and you only want users where their `status` column is `1`

Currently you would need to do

$users = User::where('status', 1);

if(is_null($status))
{
$users = $users->whereNull('column')->get();
}
else
{
$users = $users->where('column', $value)->get();
}

This pull would allow you to do

$users = User::where('status', 1)->where('column', $value)->get();

And have it generate the correct SQL,

presently if `$value` was `null` it would generate `WHERE column = null` which is not valid sql.