From c94f737f20ca23c7b7bb5fd23ab3a59d4678b2c4 Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Thu, 6 Sep 2018 12:26:08 +0800 Subject: [PATCH] Update index view stub $singleMstr->name_link should use unescaped echo, because model name_link attribute uses plain html --- src/stubs/resources/views/full/index.stub | 2 +- tests/Generators/ViewsGeneratorTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stubs/resources/views/full/index.stub b/src/stubs/resources/views/full/index.stub index 4449dc1..78c290d 100644 --- a/src/stubs/resources/views/full/index.stub +++ b/src/stubs/resources/views/full/index.stub @@ -38,7 +38,7 @@ @foreach($mstrCollections as $key => $singleMstr) {{ $mstrCollections->firstItem() + $key }} - {{ $singleMstr->name_link }} + {!! $singleMstr->name_link !!} {{ $singleMstr->description }} @can('view', $singleMstr) diff --git a/tests/Generators/ViewsGeneratorTest.php b/tests/Generators/ViewsGeneratorTest.php index 378e0b5..2a99378 100644 --- a/tests/Generators/ViewsGeneratorTest.php +++ b/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}) {{ \${$this->collection_model_var_name}->firstItem() + \$key }} - {{ \${$this->single_model_var_name}->name_link }} + {!! \${$this->single_model_var_name}->name_link !!} {{ \${$this->single_model_var_name}->description }} @can('view', \${$this->single_model_var_name})