M
M
Mars2020-07-10 23:44:04
Laravel
Mars, 2020-07-10 23:44:04

Destroy doesn't exist. What could be the problem?

When I try to delete an article on the site (namely from the user side, everything works without problems in the admin panel), it gives an error 500. If 'APP_DEBUG' is enabled, it says Method App\Http\Controllers\Member\ArticleController::destroy does not exist.

(1/1) BadMethodCallException
Method App\Http\Controllers\Member\ArticleController::destroy does not exist.

in Controller.php line 68
at Controller->__call('destroy', array('58'))
at call_user_func_array(array(object(ArticleController), 'destroy'), array('article' => '58'))
in Controller.php line 54
at Controller->callAction('destroy', array('article' => '58'))
in ControllerDispatcher.php line 45
at ControllerDispatcher->dispatch(object(Route), object(ArticleController), 'destroy')
in Route.php line 219
at Route->runController()
in Route.php line 176
at Route->run()
in Router.php line 680
at Router->Illuminate\Routing\{closure}(object(Request))
in Pipeline.php line 30
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in UserRole.php line 24
at UserRole->handle(object(Request), object(Closure), 'admin', 'member')
in Pipeline.php line 163
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53


I didn’t add everything) I haven’t come across Laravel before, so this is a complete "0". Kindly tell me how to solve this problem. Thanks in advance for your help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2020-07-10
@New_Horizons

Yes, in anything. An attempt was made to call a nonexistent destroy method on an ArticleController. Should he be? Question. But here no one can answer it for you. Maybe they forgot to change the route, maybe the name of the method, maybe something else.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question