Laravel:【Warning: Ambiguous class resolution】の解決

Laravel:【Warning: Ambiguous class resolution】の解決

『composer dump-autolode』を実行したところ次の黄色で囲まれたこんなメッセージが出ました。

Warning: Ambiguous class resolution, "App\Models\Hoge01" was found in both "~~/app/Models/Hoge01.php" and "~~/app/Models/Hoge02.php", the first will be used.

Googleさんに訳してもらうと『警告:あいまいなクラス解決』との事。

class名のダブり?

class名の重複を疑い指示されているファイルの確認に向かいます。

~~/app/Models/Hoge01.php

class Material extends Model
{

}

~~/app/Models/Hoge02.php

class Material extends Model
{

}

やっぱりダブりでしたね。手を抜いてコピーで作成したツケが出てきた感じです。

でも簡単なエラーで良かった。

 

\ 最新情報をチェック /

コメントを残す

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください