How to create manual pagination with search filter in Laravel API?

When you are using To Laravel Project with Connect to Api. Then pagination and search filter (laravel default) will not work in this process. So, you can use DataTable or Manual. So in this blog I am using manual.

This is a Search Input filter

This is Pagination

This is Js in script tag

This is First Laravel Project Controller Function for sending requests for pagination and Search Filter.

This is Second Project Controller Function for pagination and search filter.

Tagged : / / / / /

How to create custom pagination without datatable in laravel microservice

Step 1:create button input in blade file

Step 2: declare variable like curtpage, pagelimit and total record

when you click the button then apply business logic inside jquery/javascript function

Step 3: when we get data after ajax success function then apply logic

Step 4: set routing in client side

Route::prefix(‘/touroperator’)->group(function () use ($namespace) {

Route::get('iternarydetail/{email}',"$tourcontroller@getiternary");

});

Step 5: get token and client id in client side controller using function

Step 6: set env and config flie

GET_MYHOLIDAYITERNARY_URL=/api/v1/j/iternarydetail

Step 6:set Routing in server side

 Route::get(‘iternarydetail/{email}’, ‘Admin\AdminTPController@iternarydetail’);

Step 7: apply pagination query inside sever side controller function

finally output view looks like

Tagged : /

Laravel Microservice Error: Call to undefined method GuzzleHttp\Exception\ConnectException::getResponse()

there are no of reason behind this error
(i) guzzle version in composer json
(ii) connection issue between client and server side microservices

client side url in env file:

server side url in env file:

Solution:

in client side and server side url http is mention so to resolve this error we have to change the client side url and server side url in env file

change http to https in both client side and server side url

2nd solution:

check guzzle version in composer json

composer require guzzlehttp/guzzle:^6.0 in terminal or gitbash

if 6.0 not suitable then other version also you can try run

Tagged : /