---
# System prepended metadata

title: Laravel Cheatsheet
tags: [common, cheatsheets]

---

---
title: Laravel Cheatsheet
tags: common,cheatsheets
---


DISPLAY SQL QUERY IN TINKER
```
DB::listen(function ($query) { dump($query->sql); dump($query->bindings); dump($query->time); });
```

STORE TINKER OUTPUT IN STORAGE
```
\Storage::disk('public')->put("{$name}.json",json_encode((array) {Model}::get(),JSON_PRETTY_PRINT,JSON_UNESCAPED_UNICODE));
```