2014年09月16日

Laravel を使ってみる

今度は、Laravel を試用してみる。

1.Composer のインストール
  手動配置よりかは、Composer とかいうのを使ったほうがいいようだ。
  XAMPP は自端末にインストールせずに USB にインストールした。
  その関係で、インストーラがうまく動かなかった。
  なので、composer.phar をダウンロード(DLページの下のほうの Manual Downloadから)して、
  php.exe と同一フォルダに配置。
  以下の内容を、composer.bat として、php.exe と同一フォルダに保存。
@ECHO OFF
php "%~dp0composer.phar" %*

  下のように、バージョンが表示されればOK。
  composer-version.jpg

2.プロジェクトのガラを作成
  composer create-project laravel/laravel プロジェクト名 --prefer-dist
  とすればいいようだ。
G:\xampp\public_html>composer create-project laravel/laravel firstStep --prefer-dist
Installing laravel/laravel (v4.2.0)
- Installing laravel/laravel (v4.2.0)
Downloading: 100%

Created project in firstStep
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing symfony/translation (v2.5.4)
Downloading: 100%

- Installing symfony/security-core (v2.5.4)
Downloading: 100%

- Installing symfony/routing (v2.5.4)
Downloading: 100%

- Installing symfony/process (v2.5.4)
Downloading: 100%

- Installing psr/log (1.0.0)
Downloading: 100%

- Installing symfony/debug (v2.5.4)
Downloading: 100%

- Installing symfony/http-foundation (v2.5.4)
Downloading: 100%

- Installing symfony/event-dispatcher (v2.5.4)
Downloading: 100%

- Installing symfony/http-kernel (v2.5.4)
Downloading: 100%

- Installing symfony/finder (v2.5.4)
Downloading: 100%

- Installing symfony/dom-crawler (v2.5.4)
Downloading: 100%

- Installing symfony/css-selector (v2.5.4)
Downloading: 100%

- Installing symfony/console (v2.5.4)
Downloading: 100%

- Installing symfony/browser-kit (v2.5.4)
Downloading: 100%

- Installing swiftmailer/swiftmailer (v5.2.1)
Downloading: 100%

- Installing stack/builder (v1.0.2)
Downloading: 100%

- Installing predis/predis (v0.8.7)
Downloading: 100%

- Installing phpseclib/phpseclib (0.3.8)
Downloading: 100%

- Installing patchwork/utf8 (v1.1.25)
Downloading: 100%

- Installing nesbot/carbon (1.12.0)
Downloading: 100%

- Installing monolog/monolog (1.10.0)
Downloading: 100%

- Installing nikic/php-parser (v0.9.5)
Downloading: 100%

- Installing jeremeamia/superclosure (1.0.1)
Downloading: 100%

- Installing filp/whoops (1.1.2)
Downloading: 100%

- Installing ircmaxell/password-compat (1.0.3)
Downloading: 100%

- Installing d11wtq/boris (v1.0.8)
Downloading: 100%

- Installing symfony/filesystem (v2.5.4)
Downloading: 100%

- Installing classpreloader/classpreloader (1.0.2)
Downloading: 100%

- Installing laravel/framework (v4.2.9)
Downloading: 100%

symfony/translation suggests installing symfony/config ()
symfony/translation suggests installing symfony/yaml ()
symfony/security-core suggests installing symfony/validator (For using the user password constraint)
symfony/security-core suggests installing symfony/expression-language (For using the expression voter)
symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
symfony/routing suggests installing symfony/yaml (For using the YAML loader)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/routing suggests installing doctrine/annotations (For using the annotation loader)
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/http-kernel suggests installing symfony/class-loader ()
symfony/http-kernel suggests installing symfony/config ()
symfony/http-kernel suggests installing symfony/dependency-injection ()
predis/predis suggests installing ext-phpiredis (Allows faster serialization and deserialization of the Redis protocol)
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision
integer arithmetic operations.)
phpseclib/phpseclib suggests installing pear-pear/PHP_Compat (Install PHP_Compat to get phpseclib working on PHP < 4.3.3.)
patchwork/utf8 suggests installing ext-intl (Use Intl for best performance)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing raven/raven (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
d11wtq/boris suggests installing ext-readline (*)
d11wtq/boris suggests installing ext-pcntl (*)
d11wtq/boris suggests installing ext-posix (*)
laravel/framework suggests installing doctrine/dbal (Allow renaming columns and dropping SQLite columns.)
Writing lock file
Generating autoload files
Generating optimized class loader
Compiling common classes
Compiling views
Application key [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] set successfully.

G:\xampp\public_html>

5.動作確認
  laravel-arrived.jpg
  なんか、はじめの一歩はうまくいったっぽい。

作成されたプロジェクト内の構成を眺めてみたけど、どびゃーっとサブフォルダとファイルがありますた。
トレンドっぽかったので、Laravel を選んだけど、もうちょっと軽めのフレームワークが好みだなぁ。
posted by NERDY at 22:29 | Comment(0) | 技術 | このブログの読者になる | 更新情報をチェックする