Uploading content
This commit is contained in:
29
app/Tables/TableWithPaginationSettings.php
Normal file
29
app/Tables/TableWithPaginationSettings.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user