artisanコマンドのエラー対処
○artisanのmigrate createコマンドで生成したファイルは、別環境に持っていっても動かない。例えばphp artisan migrate:resetの際に、以下の様なエラーメッセージが出る。
>php artisan migrate:reset {"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","me ssage":"Class 'CreateFutarisTable' not found","file":"C:\\xampp\\rei\\vendor\\la ravel\\framework\\src\\Illuminate\\Database\\Migrations\\Migrator.php","line":29 7}}{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException", "message":"Class 'CreateFutarisTable' not found","file":"C:\\xampp\\rei\\vendor\ \laravel\\framework\\src\\Illuminate\\Database\\Migrations\\Migrator.php","line" :297}}
こういう場合はcomposer dump-autoloadを一度実行すれば動くようになる。
>composer dump-autoload