JesseObrien/laravel-cheatsheet — pull request #93 by anam-hossain (2014-07-10 01:03:33+00:00)
Title: Output raw query - toSql()

toSql() will print the raw query. This function is very helpful to work with a large and complex query.

Example:

```php
User::where('foo', '=', 'bar')->count();
```

Output:

```sql
string 'select * from `users` where `notes`.`deleted_at` is null and `foo` = ?'
```