Browse Source

Fix invalid create button route on simple index view

tags/1.2.5^0 1.2.5
Nafies Luthfi 7 years ago
parent
commit
36147f5036
  1. 2
      src/stubs/resources/views/simple/index.stub
  2. 2
      tests/Generators/Simple/ViewsGeneratorTest.php

2
src/stubs/resources/views/simple/index.stub

@ -6,7 +6,7 @@
<div class="mb-3">
<div class="float-right">
@can('create', new fullMstr)
<a href="{{ route('masters.create') }}" class="btn btn-success">{{ __('master.create') }}</a>
<a href="{{ route('masters.index', ['action' => 'create']) }}" class="btn btn-success">{{ __('master.create') }}</a>
@endcan
</div>
<h1 class="page-title">{{ __('master.list') }} <small>{{ __('app.total') }} : {{ $mstrCollections->total() }} {{ __('master.master') }}</small></h1>

2
tests/Generators/Simple/ViewsGeneratorTest.php

@ -22,7 +22,7 @@ class ViewsGeneratorTest extends TestCase
<div class=\"mb-3\">
<div class=\"float-right\">
@can('create', new {$this->full_model_name})
<a href=\"{{ route('{$this->table_name}.create') }}\" class=\"btn btn-success\">{{ __('{$this->lang_name}.create') }}</a>
<a href=\"{{ route('{$this->table_name}.index', ['action' => 'create']) }}\" class=\"btn btn-success\">{{ __('{$this->lang_name}.create') }}</a>
@endcan
</div>
<h1 class=\"page-title\">{{ __('{$this->lang_name}.list') }} <small>{{ __('app.total') }} : {{ \${$this->collection_model_var_name}->total() }} {{ __('{$this->lang_name}.{$this->lang_name}') }}</small></h1>

Loading…
Cancel
Save