first
This commit is contained in:
32
kernel/app_modules/gestalt_profile/views/view.php
Normal file
32
kernel/app_modules/gestalt_profile/views/view.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Database\Eloquent\Collection $gestalt_profile
|
||||
*/
|
||||
|
||||
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, [
|
||||
'params' => ["class" => "table table-bordered", "border" => "2"],
|
||||
'baseUrl' => "/admin/gestalt_profile",
|
||||
]));
|
||||
$table->beforePrint(function () use ($gestalt_profile) {
|
||||
$btn = IconBtnListWidget::create(['url' => '/admin/gestalt_profile'])->run();
|
||||
$btn .= IconBtnEditWidget::create(['url' => '/admin/gestalt_profile/update/' . $gestalt_profile->id])->run();
|
||||
$btn .= IconBtnDeleteWidget::create(['url' => '/admin/gestalt_profile/delete/' . $gestalt_profile->id])->run();
|
||||
return $btn;
|
||||
});
|
||||
|
||||
$table->rows([
|
||||
'photo' => function ($data) {
|
||||
return \kernel\helpers\Html::img($data, ['width' => '200px']);
|
||||
|
||||
},
|
||||
]);
|
||||
|
||||
$table->create();
|
||||
$table->render();
|
Reference in New Issue
Block a user