Answer the question
In order to leave comments, you need to log in
Error Action App\Http\Controllers\[email protected]_name not defined. Why does it occur?
Route
Route::get('admin/students', '[email protected]_avatar');
public function update_avatar()
{
}
// ну тут просто объявленная функция
<a href="{{action('[email protected]_avatar')}}">Link name/Embedded Button</a>
Answer the question
In order to leave comments, you need to log in
First:
Functions are called through camelCase with a small bull, and variables through snack_case (PSR-2).
Secondly:
Route can be called in a bunch of ways:
one.
<a href="{{ route('updateAvatar') }}">Link name/Embedded Button</a></li>
<a href="{{ action('[email protected]') }}">Link name/Embedded Button</a>
- If you haveFrontEndControlleris in namespace
App\Http\Controllers
<a href="{{ url('admin/students'') }}">Link name/Embedded Button</a></li>
<a href="/admin/students'">Link name/Embedded Button</a></li>
so FrontEndController or all the same StudentsController?
In the route one thing, in the link another. Look somewhere they wrote something wrong
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question