Pagination for search results laravel 5.3

前端 未结 10 1369
无人及你
无人及你 2021-02-01 06:17

Pagination search results

I have just started with Laravel and I am trying to make a search function with proper pagination. The function works for page one but on pag

10条回答
  •  醉梦人生
    2021-02-01 06:47

    Route::get('product', function () {
        $product= App\product::paginate(15);
    
        $product->setPath('custom/url');
    
    });
    

    View:

    {{ $product->appends(['search' => Request::get('page')])->links() }}
    

提交回复
热议问题