The allowed memory size of 134217728 bytes exhausted
This tutorial is Laravel Fatal error The allowed memory size of 134217728 bytes exhausted (tried to allocate 65015808 bytes). PHP has by default a memory usage limit of 8 MB for any given script. For the “Laravel Fatal error: The allowed memory size of 134217728 bytes exhausted…” error message, simply insert this line of code into your script at the top:
PHP
ini_set("memory_limit","16M");
You can alter your php.ini file to up the memory limit. This will affect all scripts on your server.
#php.ini memory_limit=16M
Laravel
#old code
$members = DB::table('student');
#new code
$members = DB::table('student')->get();