Closed jacobsantos closed 7 years ago
So without these changes it doesn't work in L5.3? Seems like the casting is redundant.
Casting might be redundant when it works, but it doesn't work with PHP7 and Laravel 5.3.x.
The variable is an array when it is returned. I noticed the event, but I haven't looked into why the event is working or if it is even running.
released with 1.2.2 :) thanks!
$ php artisan PHP Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in C:\xampp\htdocs\ctw-portal\vendor\ignasbernotas\laravel-model-generator\src\Commands\MakeModelsCommand.php on line 121
[Symfony\Component\Debug\Exception\FatalErrorException] syntax error, unexpected '->' (T_OBJECT_OPERATOR)
This PR should work with PHP 5.5.9 as the syntax should have been supported since PHP 5.4 or PHP 5.5. I checked 3v4l.org and yeah, this works on PHP7 and above. You have to cast on another line.
Do you want me to use this PR or create a new PR?
See #39 for fix.
Cast variable to object to force when array.