Call to undefined function App\Http\Controllers\auth()
如果我按照提供的jwt-auth的逐步说明进行操作
我已复制粘贴此AuthConstroller
$token = auth()->attempt($credentials);
Error Message: Call to undefined function App\Http\Controllers\auth()
答案 0 :(得分:0)
我认为它更像是
Auth::attempt($credentials)