Pagination in Laravel that is connected to Woocommerce site
As the title says I'm trying to create pagination in Laravel that gets its data about the products from a Woocommerce site. Laravel is connected to that site via codexshare/laravel-woocommerce package. When i try to use paginate it returns all of the data about the pages just without the links and the method links() doesn't work it just says that the method doesn't exist (BadMethodCall). Underneath I'll put the route file, the part of the controller that sends the data to the view and the view itself in which i dump the file that was sent by the controller. I should also point out I'm using Laravel 9.
Controller
public function index()
{
$svi_proizvodi = Product::paginate(15);
return view('vendor.pagination.index')->with('svi_proizvodi', $svi_proizvodi);
}
you have to put in the after the @endforeach function
you can try this method, and I think it works for you and you don't forget to apply it to
$svi_proizvodi = Product::paginate(15); this in your controller