回答編集履歴

1

2015/02/13 02:51

投稿

hogehogehoge
hogehogehoge

スコア165

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
- $pattern = $compiler->createPlainMatcher('example');
4
+ $pattern = $compiler->createPlainMatcher('example');
10
-
11
- return preg_replace($pattern, '$1<?php echo "example"; ?>', $view);
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
- [http://laravel4.kore1server.com/docs/templates](http://laravel4.kore1server.com/docs/templates)
10
+ http://laravel4.kore1server.com/docs/templates