Hello, Please Laravel throws "Memory Size Exhausted" error on usage of get() or …

mrcodesmrcodes Posts: 92
edited September 2018 in PHP

Hello, Please Laravel throws "Memory Size Exhausted" error on usage of get() or all() eloquent methods whether there are values in the db or not. But it gives expected result when I use the first() method. This is unsusual. Who can help?

E.g This 

    $transaction_history = Form::all(); // Produces the error
    dd($transaction_history);

or this

   $transaction_history = Form::get(); // Produces the error
   dd($transaction_history);

It's expected to product either null for no result or a collection of objects!

But this 

   $transaction_history = Form::first(); // Works fine

Comments

Sign In or Register to comment.