laravel/framework — pull request #2715 by semalead (2013-11-13 06:06:09+00:00)
Title: ModelNotFoundException() : include called class name

There is no way to know which model is throwing `ModelNotFoundException()`.
With this simple cod change, the following is now possible:

```php
use Illuminate\Database\Eloquent\ModelNotFoundException;

App::error(function (ModelNotFoundException $e, $code)
{
list($model, $tmp) = explode($e->getMessage(), ':', 2);

switch ($model)
{
case 'User:':
return Response::view('_errors.user_not_found', 404);

case 'Project:':
return Response::view('_errors.project_not_found', 404);

default:
return Response::view('_errors.404', 404);
}
});
```