Sure would be super helpful if someone could explain this to me. I can't figure out why it was just working and now it's not. It's when I'm trying to store an entry into the database.
Carbon\Carbon::now() giving error
When I'm in php artisan tinker and I'm trying to add a new article, I type in: $article = new App\Article(['title' => 'New', 'body' => 'new', 'published_at' => Carbon\Carbon::now()]); I get: InvalidArgumentException with message 'Trailing Data' But if I just type in Carbon\Carbon::now(); I get the expected array of date and time. Does anyone have any idea why this is happening all of the sudden? It wasn't like this yesterday.
Nevermind, I don't need Carbon\Carbon::now(), I can just use good ole PHP's date('Y-m-d'), works perfectly fine. I'd still like to know why Carbon decided to stop working for me and what the hell that exception means, but it seems this post has attracted VERY little interest.
Please or to participate in this conversation.