Artisan Tinker Class not found in eval()'d code on line 1

Imagine you’ve set up a simple blogging application in Laravel. You’ve created a migration and model for your posts table and Post model respectively.
You’ve seeded up a few posts just to test things out and you want to play with tinker so…

php artisan tinker
PHP Fatal error: Class 'App\Post' not found in eval()'d code on line 1

and you error out. You’ve probably used the wrong application namespace. To figure out where you’ve gone wrong, open your Post.php (or any other model), found in the ./app directory and look for the line of code that starts with namespace. If you’ve named your application LaraBlog then you’ll see something like this:

namespace LaraBlog;

Back to tinker - instead of \App\ substitute \LaraBlog (or whatever your namespace is) and you should be good:

php artisan tinker
=> 3