普段使われているフレームワーク等に、簡単にlaravel4のコンポーネントを組込む事が出来ます。 なかでもおすすめなのはDIコンテナとしても軽量、かつ簡単なilluminate/containerと、 illuminate/databaseです。 今回はdatabaseを実際に使ってみます。 導入方法はいつものcomposer require __DIR__ . "/vendor/autoload.php"; use Illuminate\Database\Capsule\Manager as DatabaseManager; class Database { protected $db; // public function __construct() { $this->db = new DatabaseManager; } public function connect() { $th