Bootstrap table

This is the most important part of this boilerplate. We can generate table with server side pagination very easily with Laravel premio. Just follow the below steps:

Fetching data from controller

Assume we are going to fecth Page model data.

public function index(Request $request)
    $pages = Page::paginate(10);

    return view('',compact('pages');

Now generate table in your page index page like this

    < data="Pages" />
    <x-slot name="content">
        <div class="card">
            <div class="card-body table-responsive">
                @if (count($pages))
                    {!! generate_table($pages->toArray()['data'], [
                        'attributes' => ['class' => 'table your-custom-class-name'],
                        'column' => ['id', 'name', 'created_at'],
                        'action' => 'admin.database._action', //path will be resources/views/admin/database._action.blade.php
                    ]) !!}
                <p class="text-center fw-bold">No page found.</p>

Now create your action button to edit, delete what ever you want like this:

    href="{{ route('page.edit',array($item['id'])) }}" 
    class="btn btn-primary btn-sm py-0">