How can I store the results of an Eloquent query to a variable in tinker, without printing the results to the console?
For example, when I run $threads = App\Thread::all()
I want to only store the results in the variable $threads
without seeing all the threads. Is there something like 'quiet mode' in tinker?
Tinker dumps the output of the last command executed. So a hackish trick to suppress any output is to append a null statement:
>>> $threads = App\Thread::all(); '';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With