From 47e1e2a3b8b30035e70ec25db89e34cc6169837d Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Wed, 25 Jul 2018 23:23:18 +0800 Subject: [PATCH] Update delete from lang key --- src/stubs/resources/views/full/edit.stub | 2 +- src/stubs/resources/views/full/index.stub | 16 ++++++++-------- src/stubs/resources/views/simple/forms.stub | 2 +- tests/Generators/Simple/ViewsGeneratorTest.php | 2 +- tests/Generators/ViewsGeneratorTest.php | 18 +++++++++--------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/stubs/resources/views/full/edit.stub b/src/stubs/resources/views/full/edit.stub index 79f9a82..d23de5b 100644 --- a/src/stubs/resources/views/full/edit.stub +++ b/src/stubs/resources/views/full/edit.stub @@ -17,7 +17,7 @@ {!! $errors->first('master_id', ':message') !!}
-
{{ __('app.delete_confirm') }}
+
{{ __('master.delete_confirm') }}

-
{{ __('app.delete_confirm') }}
+
{{ __('master.delete_confirm') }}

-
{{ __('app.delete_confirm') }}
+
{{ __('{$this->lang_name}.delete_confirm') }}
{!! FormField::delete( ['route' => ['{$this->table_name}.destroy', \$editable{$this->model_name}]], diff --git a/tests/Generators/ViewsGeneratorTest.php b/tests/Generators/ViewsGeneratorTest.php index b41bae3..66f28ba 100644 --- a/tests/Generators/ViewsGeneratorTest.php +++ b/tests/Generators/ViewsGeneratorTest.php @@ -54,14 +54,14 @@ class ViewsGeneratorTest extends TestCase {{ \${$this->single_model_var_name}->name_link }} {{ \${$this->single_model_var_name}->description }} - @can('view', \${$this->single_model_var_name}) - {!! link_to_route( - '{$this->table_name}.show', - __('app.show'), - [\${$this->single_model_var_name}], - ['class' => 'btn btn-default btn-xs', 'id' => 'show-{$this->lang_name}-' . \${$this->single_model_var_name}->id] - ) !!} - @endcan + @can('view', \${$this->single_model_var_name}) + {!! link_to_route( + '{$this->table_name}.show', + __('app.show'), + [\${$this->single_model_var_name}], + ['class' => 'btn btn-default btn-xs', 'id' => 'show-{$this->lang_name}-' . \${$this->single_model_var_name}->id] + ) !!} + @endcan @endforeach @@ -172,7 +172,7 @@ class ViewsGeneratorTest extends TestCase {!! \$errors->first('{$this->lang_name}_id', ':message') !!}

-
{{ __('app.delete_confirm') }}
+
{{ __('{$this->lang_name}.delete_confirm') }}
{!! FormField::delete( ['route' => ['{$this->table_name}.destroy', \${$this->single_model_var_name}]],