PHP code example of yeejiawei / laravel-table-generator
1. Go to this page and download the library: Download yeejiawei/laravel-table-generator 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/ */
yeejiawei / laravel-table-generator example snippets
$category = Category::all();
$category = Category::paginate();
return TableGenerator::create($category)
->setTableName('Categories')
->setCreatable('category.create')
->addColumn('id')
->addColumn('title')
->addCreatedAtColumns()
->addUpdatedAtColumns()
->setEnable('category.updateEnable')
->setViewable('category.show')
->setEditable('category.edit')
->setDeletable('category.destroy')
->render();