回答編集履歴
1
answer
CHANGED
@@ -1,12 +1,10 @@
|
|
1
|
-
Blade::extend関数を次のように定義してみてください。
|
1
|
+
Blade::extend関数を次のように定義してみてください。
|
2
|
-
|
3
|
-
|
2
|
+
|
4
|
-
Blade::extend(function($view, $compiler) {
|
3
|
+
Blade::extend(function($view, $compiler) {
|
5
|
-
|
4
|
+
$pattern = $compiler->createPlainMatcher('example');
|
6
|
-
|
5
|
+
return preg_replace($pattern, '$1<?php echo "example"; ?>', $view);
|
7
|
-
});
|
6
|
+
});
|
8
|
-
|
7
|
+
|
9
|
-
|
10
|
-
これでいけると思います。下記に参考サイトを載せておきます。
|
8
|
+
これでいけると思います。下記に参考サイトを載せておきます。
|
11
|
-
|
9
|
+
|
12
|
-
|
10
|
+
http://laravel4.kore1server.com/docs/templates
|