29 lines
778 B
PHP
29 lines
778 B
PHP
<?php
|
|
|
|
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;
|
|
|
|
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);
|
|
}
|
|
} |