Refactor table components to use GenericTableSettings and remove deprecated classes

This commit is contained in:
David
2025-04-25 01:19:30 -04:00
parent 7466083798
commit 9f12bc28d0
17 changed files with 177 additions and 203 deletions

View File

@@ -2,10 +2,7 @@
namespace App\Tables;
use App\Models\Product;
use App\Tables\Traits\WithColumnFormatter;
use Illuminate\Database\Eloquent\Model;
use Mmt\GenericTable\Enums\PaginationRack;
use Mmt\GenericTable\Interfaces\IGenericTable;
use Mmt\GenericTable\Interfaces\IPaginationRack;
use Mmt\GenericTable\Interfaces\IRowsPerPage;
@@ -13,17 +10,4 @@ use Mmt\GenericTable\Interfaces\IRowsPerPage;
class TableWithPaginationSettings implements IGenericTable, IPaginationRack, IRowsPerPage
{
use WithColumnFormatter;
public Model|string $model = Product::class;
public int $paginationRack = 0;
public int $rowsPerPage = 10;
public array $rowsPerPageOptions = [10,20,40,60,80];
public function __construct()
{
PaginationRack::addFlags($this->paginationRack, PaginationRack::TOP, PaginationRack::BOTTOM);
}
}