This commit is contained in:
2025-06-18 14:50:18 +03:00
parent a64ed080bb
commit 4c716a8a8c
160 changed files with 6786 additions and 23 deletions

View File

@ -0,0 +1,33 @@
<?php
/**
* @var \Illuminate\Database\Eloquent\Collection $gestalt_profile_relationship
*/
use Itguild\EloquentTable\ViewEloquentTable;
use Itguild\EloquentTable\ViewJsonTableEloquentModel;
use kernel\widgets\IconBtn\IconBtnDeleteWidget;
use kernel\widgets\IconBtn\IconBtnEditWidget;
use kernel\widgets\IconBtn\IconBtnListWidget;
$table = new ViewEloquentTable(new ViewJsonTableEloquentModel($gestalt_profile_relationship, [
'params' => ["class" => "table table-bordered", "border" => "2"],
'baseUrl' => "/admin/gestalt_profile_relationship",
]));
$table->beforePrint(function () use ($gestalt_profile_relationship) {
$btn = IconBtnListWidget::create(['url' => '/admin/gestalt_profile_relationship'])->run();
// $btn .= IconBtnEditWidget::create(['url' => '/admin/gestalt_profile_relationship/update/' . $gestalt_profile_relationship->id])->run();
$btn .= IconBtnDeleteWidget::create(['url' => '/admin/gestalt_profile_relationship/delete/' . $gestalt_profile_relationship->id])->run();
return $btn;
});
$table->rows([
'gestalt_profile_id' => [
'value' => function ($data) {
return \kernel\app_modules\gestalt_profile\models\Gestalt_profile::find($data)->fio ?? '';
}
],
]);
$table->create();
$table->render();