PHP code example of larapeak / inertiajs-data-tables

1. Go to this page and download the library: Download larapeak/inertiajs-data-tables library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

larapeak / inertiajs-data-tables example snippets


namespace App\Models;

use Larapeak\InertiajsDataTables\HasSorting;
use Illuminate\Database\Eloquent\Model;

class YourEloquentModel extends Model
{
    use HasSorting;

    public $sortables = [
        'field1', 'field2', 'field3'
    ]
}
bash
php artisan vendor:publish --provider="Larapeak\InertiajsDataTables\InertiajsDataTablesServiceProvider" --tag="assets"