11
5

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.

追加したはずのSeederが Class TableSeeder does not exist とか言われる

Posted at

事象

Seederを追加して、DatabaseSeeder.phpにも追加します。

その状態でphp artisan migrate:refresh --seedを実行するとエラーになります。


In Container.php line 752:
                                         
  Class XXXXXTableSeeder does not exist  
                                         

原因

stack overflowに同じ事象がありました。

composerのリロードが必要なんですね。

回答が微妙に間違ってて、php composer dump-autoloadとか書いてますけどcomposer dump-autoloadですね。

その後改めてmigrateすると、seedingできました。

11
5
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
11
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?