Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Call to undefined method :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:
			AppFornecedor::get()->first();
            AppFornecedor::get()->last();
            AppFornecedor::get()->reverse();
            
Why? Because, using get() the laravel recognizes that you are working with 
collections.

 
PREVIOUS NEXT
Tagged: #Call #undefined #method
ADD COMMENT
Topic
Name
3+4 =