first
This commit is contained in:
@ -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();
|
Reference in New Issue
Block a user