7 months ago

pagination without eloquent

Posted 7 months ago by esmaill23

i need to paginate response that return from another web service to show in my service.

public function index()
        $client = new Client();
        $crashes = $client->request('GET', 'http://localhost:8000/crashes')->getBody()->getContents();
        return view('crashes', ['crashes' => json_decode($crashes)]);

in this code i get a json response from another service and i want to paginate it to show in my view. how ?

Please sign in or create an account to participate in this conversation.