PHP code example of manusiakemos / laravel-tanstack
1. Go to this page and download the library: Download manusiakemos/laravel-tanstack 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/ */
manusiakemos / laravel-tanstack example snippets
use Manusiakemos\LaravelTanstack\DataTable;
use App\Models\User;
class UserDataTableController
{
public function __invoke(Request $request)
{
return DataTable::for(User::query())
->searchable(['name', 'email'])
->sortable(['name', 'email', 'created_at'])
->filterable(['status', 'role']);
}
}