@rickyspires the problem is not about php artisan tinker, it's about your Tag.php file, on line 12. Can you show us the class?
May 13, 2015
4
Level 2
Can't solve syntax error in php artisan tinker.
Hello. I have an error in my syntax and I can not see what is wrong ?
$ php artisan tinker
\App\Tag::create(['name'=>'work']);
PHP Parse error: syntax error, unexpected '[', expecting ',' or ';' in /Users/rickyspires/Code/laravel5-demo-project/app/Tag.php on line 12
[Symfony\Component\Debug\Exception\FatalErrorException]
syntax error, unexpected '[', expecting ',' or ';'
The code comes from the Laracast video "Laravel5 fundamentals - 22-selecting tags"
Thanks Ricky
Please or to participate in this conversation.