Manipulate & Verify Data Quickly Using Laravel Tinker
As developers, the terminal is our home and we can get, verify and manipulate several forms of data from there.
Imagine a situation where you want to easily verify the data from your Model methods quickly or you want to ascertain the return data of a function in your Controller, you don’t have to open your browser and do all of that.
Laravel provides us with a command line utility to work with our app.
Simple. Just run php artisan tinker
:
It activates a console within your terminal like Rails IRB, then you can do whatever you want.
Let’s see an example:
Get all the users from the users table.
var_dump the content of User Model
Get the list of all the column names in the user table
Take full advantage of Laravel Tinker, it can make your work really fast!
Let me know if you have any thoughts about this in the comment section.

- How to build your own Youtube – Part 10 - August 1, 2016
- How to build your own Youtube – Part 9 - July 25, 2016
- How to build your own Youtube – Part 8 - July 23, 2016
- How to build your own Youtube – Part 6 - July 6, 2016
- Introducing Laravel Password v1.0 - July 3, 2016
- How to build your own Youtube – Part 5 - June 28, 2016
- How to build your own Youtube – Part 4 - June 23, 2016
- How to build your own Youtube – Part 3 - June 15, 2016
- How to build your own Youtube – Part 2 - June 8, 2016
- How to build your own Youtube – Part 1 - June 1, 2016