skip to Main Content

Unable to access user id through guard after login in laravel

I have this route defined in web.php web.php Route::group(['prefix' => 'user'], function () { Route::get('login', [FrontendController::class ,'showLoginForm'])->name('user.login-show'); Route::post('login', 'AppHttpControllersLoginController@login')->name('login.post'); } this is my login controller <?php namespace AppHttpControllers; use Auth; use AppUser; use AppHttpControllersController; use IlluminateHttpRequest; use IlluminateFoundationAuthAuthenticatesUsers; use IlluminateSupportFacadesHash;…

VIEW QUESTION

Laravel 11 – Auto discovery of event listeners inside a custom directory

Before Laravel 11, I used to bind listeners to events inside the AppProvidersEventServiceProvider provider class, for example: <?php namespace AppProviders; use AppEventsMyEvent; use AppListenersMyListener; use IlluminateFoundationSupportProvidersEventServiceProvider as ServiceProvider; use IlluminateHttpClientEventsResponseReceived; class EventServiceProvider extends ServiceProvider { /** * The event to…

VIEW QUESTION

Laravel form not sending IDs

ID input <input class="form-control" type="hidden" value="{{ Auth()->user()->id }}"> After dump "_token" => "BP0ejzEjoIjFyUonjdMFNAyoRDcYCr4k7nec5czI" "name" => "Mark" "surname" => "Johanessburg" "number" => "8281992832" "email" => "[email protected]" So I'm trying to send the user's ID through the form. But when I clicked…

VIEW QUESTION
Back To Top
Search