add view eloquent table

This commit is contained in:
2024-08-06 16:46:23 +03:00
parent a14f398532
commit 59599f0344
3 changed files with 82 additions and 0 deletions

25
src/ViewEloquentTable.php Normal file
View 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());
}
}