PHP code example of twomein / laravel-dynatable

1. Go to this page and download the library: Download twomein/laravel-dynatable 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/ */

    

twomein / laravel-dynatable example snippets



    //Get an Eloquent collection
    $cars = Car::all();
    
    //Define the columns you want to send
    $columns = ['id', 'name', 'price', 'stock'];
    
    // Build dynatable response
    return Dynatable::make($cars, $columns, Input::all());
  }
}