Work with laravel tinker Work with laravel tinker laravel laravel

Work with laravel tinker


Tinker is case sensitive so if you are trying to create the object the way you are doing it it will fail so instead try placing the whole namespace in the exact way it is on your project

$article = new App\Article;


Use terminal to go to your project, and type :

php artisan tinker

Then type the following command for example to create a new Article:

$article = new Article;

After that you can manipulate the article like any Article object :

$article->title = "foo";

Maybe you should take a look at Laravel Fundamentals at laracasts.com, it's a greate serie for Laravel beginners.

Regards.