I am trying to paginate data from a database using laravel. My code is as follows:
echo "<table class='table table-striped table-hover'><tbody>";
$orders=DB::table('customers')->paginate(7);
foreach ($orders->results as $order):
echo "<tr><td>".$order->name."</td>
<td> <button type='button' class='btn btn-sm btn-success pull-right'>
Edit</button></td>
<td><button type='button' class='btn btn-sm btn-danger pull-right'>
Delete</button></td></tr>";
endforeach;
echo "</table>";
echo $orders->links();
This outputs the paginate links in different lines like so:
« Previous
1
2
Next »
Is it because there is a conflict with bootstrap3? Any help is highly appreciated.