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