1. Go to this page and download the library: Download white-frame/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/ */
white-frame / dynatable example snippets
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use WhiteFrame\Dynatable\Dynatable;
class UserController extends Controller
public function dynatable(Request $request)
{
// Get a query builder of what you want to show in dynatable
$cars = Car::where('year', '=', 2007); // or Car::query() for all cars
$columns = ['id', 'name', 'price', 'stock'];
// Build dynatable response with your query builder, columns and all input from dynatable font end javascript
$dynatable = Dynatable::of($cars, $columns, $request->all()));
// ... Here you can customize the result and change columns handling with $dynatable (see example below)
// Build the response and return to the table
return $dynatable->make();
}
}