From b2277ba3a2e07e17bc29655e453cb7fb42cbd691 Mon Sep 17 00:00:00 2001 From: ilmedova Date: Tue, 13 Dec 2022 15:49:48 +0500 Subject: [PATCH] FAQ admin ready for test --- .../Controllers/Admin/QuestionCrudController.php | 12 ++++++------ lang/en/app.php | 5 ++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/Admin/QuestionCrudController.php b/app/Http/Controllers/Admin/QuestionCrudController.php index bee1dae5..6307b2d7 100755 --- a/app/Http/Controllers/Admin/QuestionCrudController.php +++ b/app/Http/Controllers/Admin/QuestionCrudController.php @@ -31,7 +31,7 @@ public function setup() } CRUD::setModel(\App\Models\Question::class); CRUD::setRoute(config('backpack.base.route_prefix') . '/question'); - CRUD::setEntityNameStrings('question', 'questions'); + CRUD::setEntityNameStrings(trans('app.faq.title'), trans('app.faq.list_title')); } /** @@ -46,12 +46,12 @@ protected function setupListOperation() [ 'name' => 'question_text', 'type' => 'text', - 'label' => 'Question text' + 'label' => trans('app.faq.question_text') ], [ 'name' => 'options', 'type' => 'text', - 'label' => 'Options' + 'label' => trans('app.faq.answer') ] ]); } @@ -70,12 +70,12 @@ protected function setupCreateOperation() [ 'name' => 'question_text', 'type' => 'text', - 'label' => 'Question text' + 'label' => trans('app.faq.question_text') ], [ 'name' => 'options', - 'type' => 'text', - 'label' => 'Options' + 'type' => 'simplemde', + 'label' => trans('app.faq.answer') ] ]); } diff --git a/lang/en/app.php b/lang/en/app.php index 12534149..b2e0cc0d 100755 --- a/lang/en/app.php +++ b/lang/en/app.php @@ -234,6 +234,9 @@ 'resolutionbases' => 'resolutionbases' ], 'faq' => [ - 'list_title' => 'FAQ' + 'list_title' => 'FAQs', + 'title' => 'FAQ', + 'question_text' => 'Question', + 'answer' => 'Answer' ] ];