0

When executing the command "php artisan route:list" if receive this message:

   Illuminate\Contracts\Container\BindingResolutionException  : Target class [App\Http\Controllers\API\Auth\LoginController] does not exist.

  at /mnt/c/Sources/wachtweken.nl/vendor/laravel/framework/src/Illuminate/Container/Container.php:805
    801|
    802|         try {
    803|             $reflector = new ReflectionClass($concrete);
    804|         } catch (ReflectionException $e) {
  > 805|             throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
    806|         }
    807|
    808|         // If the type is not instantiable, the developer is attempting to resolve
    809|         // an abstract type such as an Interface or Abstract Class and there is

  Exception trace:

  1   Illuminate\Foundation\Console\RouteListCommand::Illuminate\Foundation\Console\{closure}()
      [internal]:0

  2   ReflectionException::("Class App\Http\Controllers\API\Auth\LoginController does not exist")
      /mnt/c/Sources/wachtweken.nl/vendor/laravel/framework/src/Illuminate/Container/Container.php:803

I understand that the system can't find a class in App\Http\Controllers\API\Auth\LoginController because it's located in App\Http\Controllers\Auth\LoginController

Where does he get the info from that's stored in App\Http\Controllers\API\Auth\LoginController ?

A lot of topics are giving "php artisan config:cache" as solution but that doesn't work

1 Answer 1

0

I noticed that in the web.php there was a line in the API namespace:

Route::get('logout', 'Auth\LoginController@logout');

That shouldn't be there. That solved the error.

Sign up to request clarification or add additional context in comments.

2 Comments

Mark your answer as best
That can only done after two days (according to the popup i received when clicking on the check.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.