Browse Source

Update index view stub

$singleMstr->name_link should use unescaped echo, because
model name_link attribute uses plain html
tags/1.2.2
Nafies Luthfi 7 years ago
parent
commit
c94f737f20
  1. 2
      src/stubs/resources/views/full/index.stub
  2. 2
      tests/Generators/ViewsGeneratorTest.php

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

@ -38,7 +38,7 @@
@foreach($mstrCollections as $key => $singleMstr) @foreach($mstrCollections as $key => $singleMstr)
<tr> <tr>
<td class="text-center">{{ $mstrCollections->firstItem() + $key }}</td> <td class="text-center">{{ $mstrCollections->firstItem() + $key }}</td>
<td>{{ $singleMstr->name_link }}</td>
<td>{!! $singleMstr->name_link !!}</td>
<td>{{ $singleMstr->description }}</td> <td>{{ $singleMstr->description }}</td>
<td class="text-center"> <td class="text-center">
@can('view', $singleMstr) @can('view', $singleMstr)

2
tests/Generators/ViewsGeneratorTest.php

@ -54,7 +54,7 @@ class ViewsGeneratorTest extends TestCase
@foreach(\${$this->collection_model_var_name} as \$key => \${$this->single_model_var_name}) @foreach(\${$this->collection_model_var_name} as \$key => \${$this->single_model_var_name})
<tr> <tr>
<td class=\"text-center\">{{ \${$this->collection_model_var_name}->firstItem() + \$key }}</td> <td class=\"text-center\">{{ \${$this->collection_model_var_name}->firstItem() + \$key }}</td>
<td>{{ \${$this->single_model_var_name}->name_link }}</td>
<td>{!! \${$this->single_model_var_name}->name_link !!}</td>
<td>{{ \${$this->single_model_var_name}->description }}</td> <td>{{ \${$this->single_model_var_name}->description }}</td>
<td class=\"text-center\"> <td class=\"text-center\">
@can('view', \${$this->single_model_var_name}) @can('view', \${$this->single_model_var_name})

Loading…
Cancel
Save