V
V
Valery Khizhevsky2017-08-17 13:41:38
Laravel
Valery Khizhevsky, 2017-08-17 13:41:38

Why can't he see the route?

The error itself is NotFoundHttpException in RouteCollection.php (line 179)
Why is this happening?
Here is the controller

public function code(Request $request){
        $data = $request->all();
        $info = User::where('login', $data['login'])
            ->where('code', $data['code'])
            ->update(['code' => 1]);
        echo $info;
    }

Here is the route
Route::group(['middleware' => 'web'], function () {
    Route::get('code/activation', '[email protected]');
});

Well, the actual form itself, which is located in the views folder
<form action="code/activation" method="get">
<p>Завершение регистрации</p>
<input class="auth-input" type="text" name="code" placeholder="183fB" required><br>
<input type="hidden" name="email" placeholder="login" value="{{ $login }}" required>
<input class="auth-button" type="submit" name="make-auth" value="Подтвердить"><br>
{{ csrf_field() }}
</form>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hakkol, 2017-08-17
@hakkol

1) Check that your class is called nativeRegisterController, and not NativeRegisterController
2) Specify a normal action -

action="{{ action('[email protected]') }}"
or action="{{ url('/code/activation') }}"
3) Well, look at what page you are on when it gives an error (I'm talking about url)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question