Back

BadMethodCallException: Method attempt does not exist.


Dear,

Im trying to log a user in via ID and it says it is a BadMethodCallException. I do have this:

$app->withFacades();
$app->withEloquent();

Next to that I tried the following ways to perform a Auth via its class.

Auth::attempt(...)
\Illuminate\Support\Facades\Auth::attempt(...)
Auth::login(...)
\Illuminate\Support\Facades\Auth::login(...)

The error report

[2017-09-10 12:25:02] lumen.ERROR: BadMethodCallException: Method attempt does not exist. in D:\xampp\htdocs\xjoeyv\vendor\illuminate\support\Traits\Macroable.php:74
Stack trace:
#0 D:\xampp\htdocs\xjoeyv\vendor\illuminate\auth\AuthManager.php(294): Illuminate\Auth\RequestGuard->__call('attempt', Array)
#1 D:\xampp\htdocs\xjoeyv\vendor\illuminate\support\Facades\Facade.php(221): Illuminate\Auth\AuthManager->__call('attempt', Array)
#2 D:\xampp\htdocs\xjoeyv\routes\web.php(65): Illuminate\Support\Facades\Facade::__callStatic('attempt', Array)
#3 [internal function]: Closure->{closure}()
#4 D:\xampp\htdocs\xjoeyv\vendor\illuminate\container\BoundMethod.php(29): call_user_func_array(Object(Closure), Array)
#5 D:\xampp\htdocs\xjoeyv\vendor\illuminate\container\BoundMethod.php(75): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#6 D:\xampp\htdocs\xjoeyv\vendor\illuminate\container\BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Laravel\Lumen\Application), Object(Closure), Object(Closure))
#7 D:\xampp\htdocs\xjoeyv\vendor\illuminate\container\Container.php(539): Illuminate\Container\BoundMethod::call(Object(Laravel\Lumen\Application), Object(Closure), Array, NULL)
#8 D:\xampp\htdocs\xjoeyv\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(654): Illuminate\Container\Container->call(Object(Closure), Array)
#9 D:\xampp\htdocs\xjoeyv\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(628): Laravel\Lumen\Application->callActionOnArrayBasedRoute(Array)
#10 D:\xampp\htdocs\xjoeyv\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(528): Laravel\Lumen\Application->handleFoundRoute(Array)
#11 D:\xampp\htdocs\xjoeyv\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(781): Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
#12 D:\xampp\htdocs\xjoeyv\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(534): Laravel\Lumen\Application->sendThroughPipeline(Array, Object(Closure))
#13 D:\xampp\htdocs\xjoeyv\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(475): Laravel\Lumen\Application->dispatch(NULL)
#14 D:\xampp\htdocs\xjoeyv\index.php(28): Laravel\Lumen\Application->run()
#15 {main}  

Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us