How to solve a timeout error in Laravel 5

后端 未结 13 2193
说谎
说谎 2020-11-30 08:43

I have the following set up:

In routes I have:

Route::get(\'articles\', \'ArticlesController@index\');

The index method in the controller is simply:<

13条回答
  •  悲哀的现实
    2020-11-30 08:52

    In Laravel:

    Add set_time_limit(0) line on top of query.

    set_time_limit(0);
    
    $users = App\User::all();
    

    It helps you in different large queries but you should need to improve query optimise.

提交回复
热议问题