skip to Main Content

The issue is that my laravel application speed’s is too slow when the result has over 7k rows.

It keep loading for at 23 seconds or more to show the data in a table (i’m using bootstrap model of datatable)

System details:
PHP Version 8.0.2
Laravel Version 9.11

2

Answers


  1. Chosen as BEST ANSWER

    i used paginate in my controller in this way :

    public function list(){
    $file = File::orderBy('date', 'DESC')->paginate(10);
    return view('welcome' , compact('file'));
    }
    

    and i add this line in Blade :

    {{ $file->links() }}
    

    and it works at 702ms


  2. Well, you can use Cache and Pagination to solve this problem.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search