@expeerd

В чем проблема с роутингом?

При попытке сделать регистрацию получаю такую ошибку: NotFoundHttpException in compiled.php line 8153, почитал - пишут проблема с роутингом, но никак не могу понять где?
Лог:
in compiled.php line 8153
at RouteCollection->match(object(Request)) in compiled.php line 7392
at Router->findRoute(object(Request)) in compiled.php line 7357
at Router->dispatchToRoute(object(Request)) in compiled.php line 7349
at Router->dispatch(object(Request)) in compiled.php line 2262
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9468
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2882
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9460
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12756
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9460
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 11391
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9460
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12497
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9460
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12436
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9460
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2932
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9460
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9450
at Pipeline->then(object(Closure)) in compiled.php line 2209
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2192
at Kernel->handle(object(Request)) in index.php line 54

код контроллера:
<?php

namespace App\Http\Controllers\Auth;

use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;

class AuthController extends Controller
{


    use AuthenticatesAndRegistersUsers, ThrottlesLogins;


    public function __construct()
    {
        $this->middleware('guest', ['except' => 'getLogout']);
    }

 
    protected function validator(array $data)
    {
        return Validator::make($data, [
            'name' => 'required|max:255',
            'lastName' => 'required|max:255',
            'secondName' => 'required|max:255',
            'email' => 'required|email|max:255|unique:users',
            'password' => 'required|confirmed|min:6',
            'gender' => 'required|string',
            'phone' =>'required|digits:8',
            'birth' => 'required|date',
            'ref' => 'digits:1'
        ]);
    }


    protected function create(array $data)
    {
        return User::create([
            'name' => $data['name'],
            'lastName' => $data['lastName'],
            'secondName' => $data['secondName'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
            'gender' => $data['gender'],
            'phone' => $data['phone'],
            'birth' => $data['birth'],
            'ref' => $data['ref']
        ]);
    }
}

роутинг:
Route::get('/', function () {
    return view('welcome');
});



Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');

Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');
  • Вопрос задан
  • 189 просмотров
Пригласить эксперта
Ответы на вопрос 1
Попробуйте php artisan clear-compiled
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы