declare(strict_types=1);
namespace App\Inertable;
use App\Models\User;
use Rizkhal\Inertable\Column;
use Illuminate\Support\Carbon;
use Rizkhal\Inertable\Inertable;
use Illuminate\Database\Eloquent\Builder;
class UserTable extends Inertable
{
public function query(): Builder
{
return User::query();
}
public function columns(): array
{
return [
Column::checkbox(),
Column::make(__('Name'), 'name')->sortable()->searchable(),
Column::make(__('Email'), 'email')->sortable()->searchable(),
Column::make(__('Verified'), 'email_verified_at')->sortable()->searchable()->format(fn (Carbon $value): string => $value->format('d/m/Y')),
Column::make(__('status'), 'status')->sortable()->searchable(),
Column::action(),
];
}
}