Please use code blocks for your post:
https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello Community,
so i've been coding with laravel for a few weeks now, but i still feel like i somehow misunderstood routing.
example:
Route::view('/password', 'changePassword')->name('changePasswordView')->middleware('auth');
Route::get('/password/change', 'UserController@changePassword')->name('changePassword')->middleware('auth');
As you can see in the example above, i have a route for the change password page (view) And then i have a route for the change password action(?)
I feel like this isn't the right way to do. I do this very often, and i really haveing trouble finding names for those routes then.
Another example would
Route::view('create', 'pages/admin/users/create')->name('view.create');
Route::post('create', 'AdminController@createUser')->name('user.create');
Here i tried to give the routes better names.. but still.. i don't know if im doing this right..
i would really appreciate if some of you guys could give me some tips
Cheers
Please or to participate in this conversation.