php artisanで"class not found"と出たら

いつも忘れるのでメモ。

$ php artisan db:seed --class=HogeSeeder


  [ReflectionException]
  Class HogeSeeder does not exist

Migrations & Seeding - Laravel - The PHP Framework For Web Artisans にあるとおり、このコマンドを実行

$ composer dump-autoload
Generating autoload files

通った。

$ php artisan db:seed --class= HogeSeeder
$