Hello I developing simple website. Recently I added auth(register/login) system. The problem is that when I log in to my user the routing goes to previously created route "/backend" even though I created new route called "/checkUser".
I tried to clear all kind of cache but it did not work.
login.blade.php login button fragment:
<div class="form-group">
<div class="form-group">
<button href="{{ url('/checkUser') }}"
type="submit" class="btn btn-primary btn-user btn-block">
{{ __('Login') }}
</button>
</div>
</div>
web.php:
<?php
use IlluminateSupportFacadesRoute;
use IlluminateSupportFacadesAuth;
use AppHttpControllersackendController;
Route::get('/', function () {
return view('welcome');
});
Route::get('/checkUser', [backendController::class, 'userCheck']);
Auth::routes();
Route::get('/home', [AppHttpControllersHomeController::class, 'index'])->name('home');
backendController.php:
public function userCheck()
{
$userRoles = Auth::user()->roles->pluck('name');
dd($userRoles);
}
question from:
https://stackoverflow.com/questions/65865366/laravel-8-view-does-not-update-routing 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…