Hello, I've been working for a while with laravel components and to be honest, they are good and smart BUT, it is very complex and has much unneeded complexity.
Straight to the point, I am using Laravel Illuminate Database Component (using Composer)
I have setup perfectly but some features do not work at all..
Take for example (what I need atm) touch() method.
This is my code :
Tokens::where('token', '=', $token)->first()->touch();
and the error output is :
PHP Fatal error: Call to a member function timestamps() on a non-object in .... the line above
The documentation is not detailed on the uses of many functions as well as all the search results rendered nothing about this issue.
Best Regards
Query did not returned any results, thus error. Solve by:
Tokens::where('token', '=', $token)->firstOrFail()->touch();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community