📌  相关文章
📜  找不到类“App\Http\Controllers\Auth” - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:23.501000             🧑  作者: Mango

代码示例3
Because your controller is namespaced unless you specifically import the Auth namespace, PHP will assume it's under the namespace of the class, giving this error.

To fix this, add use Auth; at the top of AdminHomeController file along with your other use statements or alternatively prefix all instances of Auth with backslash like this: \Auth to let PHP know to load it from the global namespace.