LoginSignup
6
6

More than 5 years have passed since last update.

FuelPHPでmustacheを使う(インストール)

Last updated at Posted at 2014-04-10

FuelPHPのParserの情報を探すと、Twigの事ばかりでmustacheを使用したという情報があまりない。。。

mustache.phpのインストール

前提条件として、FuelPHPのインストールは完了しているものとする。
PROJECT_ROOT/にfuelディレクトリーが存在するものとする。

1.
mustache.phpのGitHubページにアクセス。
https://github.com/bobthecow/mustache.php/wiki

2.
Installationの記述を、fuelディレクトリと同階層のcomposer.jsonに追記する。

PROJECT_ROOT/composer.json
"require": {
  "mustache/mustache": "~2.1" // requireにここだけ追記
}, 

3.
composerを使用してインストールする。

$ php PROJECT_ROOT/composer.phar update

4.
mustache.phpを有効にする。

PROJECT_ROOT/fuel/app/config/config.php
// コメントアウトを解除して、結果こうなれば良い
'always_load' => array(  'packages' => array(    'parser'  )),

これで導入は完了するはず。
俺はインストールとか無茶苦茶苦手な人だけど、すんなりいけた。

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6