Error uninstalling Laravel Passport

Asked

Viewed 77 times

0

I had installed Laravel’s Passport, but, I decided to work with JWT (removed via Composer) Now Laravel is not locating my functions in the controller What am I supposed to do? It seems I have to change some configuration

BadMethodCallException: Method [getEstudantesTodos] does not exist on [App\Http\Controllers\TurmasController]. in file C:\sgeweb\api\vendor\laravel\framework\src\Illuminate\Routing\Controller.php on line 68
  • It seems to me that the error has no relation to the problem of your controller. Could you edit the question and provide more information? For example, the version of the Laravel used, the Composer packages...

  • @Wallacemaxters really didn’t have to do with the controller. It was working all right until I uninstall My Laravel Passport is 5.6

  • Yes, but as you say that the problem is in Passport but you are saying that it has nothing to do with the controller, and the code shown in the question is an error referring to a controller?

  • If you install Passport again, does it? If not, we already know the problem isn’t there. Maybe you’re talking about the configuration of config/auth.php.

  • @Wallacemaxters is the error that appeared after I uninstalled. Laravel is not accepting the controller path

  • In fact, the error messages are very clear: "Method getEstudantesAll does not exist in the App Http Controllers Turmascontroller in the file ... Controller.php . The problem is that you have a method that is being searched for by a route that simply does not exist.

  • @Wallacemaxters There is. It was working normally until I uninstalled Passport. I created a new controller to test and it worked. It seems to me that when I uninstalled Passport some problem occurred in the configuration of Controllers

  • @Wallacemaxters There is a problem in configuring Laravel that lost the route of controller functions when uninstalling Passport. I created another controller and copied all the previous Controller and changed the route and worked

Show 3 more comments

1 answer

1


You can remove the Passport manually by deleting the line "Laravel / Passport":"...." in your Composer.json file, then run the Composer update, using Composer update.

Be sure to remove references in the app.config file - Laravel Passport Passportserviceprovider :: class

And all classes that depend on Passport should also be edited. The most common classes are:

User models, Hasapitoken traits. Authserviceprovider, remove Passport ::Routes(); in your boot method.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.