This error assumes that User::where('email', '=', $userEmail)->first() returns null, and not a problem updating your model.
Make sure you actually have a User before trying to change its properties or use the firstOrFail() method.
$UpdateDetails = User::where('email', $userEmail)->first(); if (is_null($UpdateDetails)) { return false; }
or using the firstOrFail() method, there is no need to check if the user is empty because it throws an exception ( ModelNotFoundException ) when the model is not found, which you can catch using App::error() http://laravel.com/ docs / 4.2 / errors # handling-errors
$UpdateDetails = User::where('email', $userEmail)->firstOrFail();
Wader
source share