It is done with CSS on the frontend rather than on the server-side; i.e. all of the individual page links are in the DOM, but hidden by default and only visible after the md breakpoint (see hidden md:flex Tailwind classes in the class list):
@tykus I don't understand why the paginate type information is sent through Laravel, so if it is to be handled with css, the paginate type should be sent by Laravel first.
@johnDoe220 already explained how that can be easily achieved using CSS only.
Otherwise, you will need the application to detect that the browser is mobile to determine which pagination method to use. jessengers/agent is a package that can be used for this purpose but it appears to a while since it received any attention...