add view eloquent table
This commit is contained in:
25
src/ViewEloquentTable.php
Normal file
25
src/ViewEloquentTable.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Itguild\EloquentTable;
|
||||
|
||||
use Exception;
|
||||
use Itguild\Tables\ViewJsonTable;
|
||||
use JetBrains\PhpStorm\NoReturn;
|
||||
|
||||
class ViewEloquentTable extends ViewJsonTable
|
||||
{
|
||||
|
||||
private ViewJsonTable $table;
|
||||
private ViewJsonTableEloquentModel $dataProvider;
|
||||
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
#[NoReturn] public function __construct(ViewJsonTableEloquentModel $dataProvider)
|
||||
{
|
||||
$this->dataProvider = $dataProvider;
|
||||
parent::__construct($this->dataProvider->getJson());
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user