skip to Main Content

Where should application logic go in Laravel?

Currently, whenever a user opens a URL '/users/new', I use the following route that leads to the controller called 'UsersController': Route::post('/users/new', [AppHttpControllersApiUserController::class, 'newUser']); Inside the Controller, the 'newUser' method is responsible for sending the request data (name_user, email_user, password_user) to…

VIEW QUESTION

Why doesn’t session flash work in Laravel 8?

I'm using Laravel 8 for my project and for updating a form and there fore in the Controller, I added this for showing success message: Session::flash('success','asdasd'); But this does not show any data in the blade: @if(Session::has('success')) <div class="alert alert-success"…

VIEW QUESTION
Back To Top
Search