Calling save() method doesn't output anything in Tinker.
Hello,
When i build up an object and call save() method in tinker, it doesn't output anything nor does it save any data into database table. I tried in both Git Bash and Laragon's terminal but same thing is happening in both the terminals.
I'm on Windows 7 32-bit running Laravel Framework 5.5.28 in Laragon - nginx.
\Illuminate\Database\Eloquent\Model::save returns a bool - so it's either a true/false.
Not sure what your terminal's display works like, but it's very possible that those boolean return values are just not getting displayed for you.
If you really need see something then you could try:
$res = (int) $article->save();
echo $res;
perhaps that will show you whether the value was saved. If it actually was not saved, you should check your logs, normally in: storage/logs/laravel.log
and see what's at the end - this may give you a better indication of what's going wrong.
I just found out I have 2 installations of PHP on my system. One that came with XAMPP and other one that came with Laragon. After checking my path environment variables, I found that it was using PHP that came with XAMPP. So after updating my path variable to use Laragon's php binary, everything is working fine now.