From 3d0f49be0c9375d4629959f948eb8e270cdc3ad3 Mon Sep 17 00:00:00 2001 From: A1Gard Date: Mon, 24 Jun 2024 22:03:31 +0330 Subject: [PATCH] optimized attachment and list template --- app/Http/Controllers/Admin/AttachmentController.php | 4 ++-- resources/views/admin/templates/panel-list-template.blade.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Admin/AttachmentController.php b/app/Http/Controllers/Admin/AttachmentController.php index 1e8aa4a..cd796dc 100644 --- a/app/Http/Controllers/Admin/AttachmentController.php +++ b/app/Http/Controllers/Admin/AttachmentController.php @@ -17,8 +17,8 @@ class AttachmentController extends XController // protected $_MODEL_ = Attachment::class; // protected $SAVE_REQUEST = AttachmentSaveRequest::class; - protected $cols = ['title']; - protected $extra_cols = ['slug']; + protected $cols = ['title','ext','is_fillable']; + protected $extra_cols = ['slug','id']; protected $searchable = ['title', 'subtitle', 'body']; diff --git a/resources/views/admin/templates/panel-list-template.blade.php b/resources/views/admin/templates/panel-list-template.blade.php index 1337b4b..94b3def 100644 --- a/resources/views/admin/templates/panel-list-template.blade.php +++ b/resources/views/admin/templates/panel-list-template.blade.php @@ -201,7 +201,7 @@ @case($col == 'icon') @break - @case($col == 'is_default') + @case(substr($col,0,3) == 'is_') @if($item->$col == 1) @endif