2
1

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 3 years have passed since last update.

Laravelのモデル名を変更した際のエラーを解決する

Last updated at Posted at 2019-11-25

問題の背景

プロジェクト下のapp/Posts.phpというモデル名をPost.phpに変更したい

変更に伴い直面したエラー

単純にファイル名をPost.phpに変更したら

include(/Applications/MAMP/htdocs/laravel/stepc/vendor/composer/../../app/Post.php): failed to open stream: No such file or directory
スクリーンショット 2019-11-25 14.24.08.png というエラーがでた。

解決方法

ターミナルで

composer update

で解決!

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?