Appel à la méthode indéfinie: Last ()
php artisan tinker ...
Well if u try to use \App\<class_name>::first();
It really works, for me i mean. But i tried with last \App\<class_name>::last();
and the same with reverse method and didn't work appearing the error message:
Call to undefined method :last()
So, the solution is better using:
\App\Fornecedor::get()->first();
\App\Fornecedor::get()->last();
\App\Fornecedor::get()->reverse();
Why? Because, using get() the laravel recognizes that you are working with
collections.
Wide-eyed Wolf