teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

2015/02/13 02:51

投稿

hogehogehoge
hogehogehoge

スコア165

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