2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Laravel IDE Helper Generator

Posted at

Laravel IDE Helper Generator のインストールでまごついたのでメモしておきます。

最初に composer.json に IDE Helper Generator をダウンロードする記述を追加します。

composer.json
	"require": {
		"laravel/framework": "4.2.*",
		"barryvdh/laravel-ide-helper": "1.*"  追加
	},

composer update を実行します。

続いてサービスプロバイダーを追加します。
app/config/app.php の providers 配列に次のように記述します。

app/config/app.php
	'providers' => array(
	   
	   
		'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',  追加
	},

最後に "php artisan ide-helper:generate", を composer.json に記述するのですが、
必ず clear-compiled の後、php artisan optimize の前に記述してください。

composer.json
	"scripts": {
		"post-install-cmd": [
			"php artisan clear-compiled",
			"php artisan optimize"
		],
		"post-update-cmd": [
			"php artisan clear-compiled",
			"php artisan ide-helper:generate",  追加
			"php artisan optimize"
		],

composer update を実行します。

※ 途中の update はせずとも、最後の update だけで大丈夫だと思います。

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?