card list

This commit is contained in:
Kavalar 2025-01-27 12:35:25 +03:00
parent dd28eadf79
commit de31005f1a

View File

@ -25,7 +25,15 @@ $table = new ListEloquentTable(new EloquentDataProvider(Card::query()->orderBy("
'currentPage' => $page_number,
'perPage' => 8,
'params' => ["class" => "table table-bordered", "border" => "2"],
'baseUrl' => "/admin/card"
'baseUrl' => "/admin/card",
'fillable' => [
'user_id',
'balance',
'username',
'card_template_id',
'card_file_id',
'status',
],
]));
$table->columns([
@ -39,6 +47,11 @@ $table->columns([
return \kernel\app_modules\card\models\CardTemplate::find($data)->title;
}
],
"username" => [
"filter" => [
"class" => \Itguild\Tables\Filter\InputTextFilter::class
]
],
'card_file_id' => [
'value' => function ($data) {
$file = \kernel\app_modules\card\models\CardFile::find($data)->file;