0

I just have upgraded one of my project from laravel version 5.2 to 7.1 But now I have started getting following error

Method App\\Http\\Controllers\\Controller::show does not exist.

I know there is not a function named show in my controller class. But if there is any way to trigger custom named method instead of show() while declaring resource attribute in web.php file. Here is my resource declaration in web.php

Route::resources([
      'first', 'FirstController',
      'second','SecondController'
]);

Can I make some customization to tackle this situation.

Mind Gauge
  • 39
  • 1
  • 1
  • 4
  • Why not rename your custom named method to show()? Or add a `show()` method in your controller that triggers/runs your custom named method? – brombeer Sep 01 '20 at 10:04
  • actually I don't wanna use show() method.as there are too many other methods which I have in my controller classes. – Mind Gauge Sep 01 '20 at 10:28
  • Then maybe use different controllers, one "resource" controller (with `index()`, `create()`, `edit()` etc) and another for all your other methods – brombeer Sep 01 '20 at 10:39

0 Answers0