Skip to content

Conversation

pushpak1300
Copy link
Member

@pushpak1300 pushpak1300 commented Sep 4, 2025

This MR proposes to standardising route naming for a consistent pattern, making testing easier across different starter kits.

It updates the following routes in the application.

Action Before After
Profile GET profile.edit settings.profile
Profile PATCH profile.update settings.profile.update
Profile DELETE profile.destroy settings.profile.destroy
Password GET password.edit settings.password
Password PUT password.update settings.password.update
Appearance GET appearance settings.appearance

Livewire Routes

  GET|HEAD   / ........................................................................................................ home
  GET|HEAD   confirm-password ............................................................................. password.confirm
  GET|HEAD   dashboard ........................................................................................... dashboard
  GET|HEAD   flux/editor.css .......................................... Flux\AssetManager@editorCss › AssetManager@editorCss
  GET|HEAD   flux/editor.js ............................................. Flux\AssetManager@editorJs › AssetManager@editorJs
  GET|HEAD   flux/editor.min.js ................................... Flux\AssetManager@editorMinJs › AssetManager@editorMinJs
  GET|HEAD   flux/flux.js ................................................... Flux\AssetManager@fluxJs › AssetManager@fluxJs
  GET|HEAD   flux/flux.min.js ......................................... Flux\AssetManager@fluxMinJs › AssetManager@fluxMinJs
  GET|HEAD   forgot-password .............................................................................. password.request
  GET|HEAD   livewire/livewire.js .............................. Livewire\Mechanisms › FrontendAssets@returnJavaScriptAsFile
  GET|HEAD   livewire/livewire.min.js.map ........................................ Livewire\Mechanisms › FrontendAssets@maps
  GET|HEAD   livewire/preview-file/{filename} ..... livewire.preview-file › Livewire\Features › FilePreviewController@handle
  POST       livewire/update ........................... livewire.update › Livewire\Mechanisms › HandleRequests@handleUpdate
  POST       livewire/upload-file ................... livewire.upload-file › Livewire\Features › FileUploadController@handle
  GET|HEAD   login ................................................................................................... login
  POST       logout ................................................................... logout › App\Livewire\Actions\Logout
  GET|HEAD   register ............................................................................................. register
  GET|HEAD   reset-password/{token} ......................................................................... password.reset
  ANY        settings .............................................................. Illuminate\Routing › RedirectController
  GET|HEAD   settings/appearance ....................................................................... settings.appearance
  GET|HEAD   settings/password ........................................................................... settings.password
  GET|HEAD   settings/profile ............................................................................. settings.profile
  GET|HEAD   storage/{path} .................................................................................. storage.local
  GET|HEAD   up ............................................................................................................ 
  GET|HEAD   verify-email .............................................................................. verification.notice
  GET|HEAD   verify-email/{id}/{hash} ..................................... verification.verify › Auth\VerifyEmailController

                                                                                                         Showing [26] routes

React Routes


(base) ➜  react-starter-kit git:(feat/standardise_routes) ✗ php artisan route:list

  GET|HEAD  / ............................................................................................................................ home
  GET|HEAD  confirm-password ....................................................... password.confirm › Auth\ConfirmablePasswordController@show
  POST      confirm-password ................................................ password.confirm.store › Auth\ConfirmablePasswordController@store
  GET|HEAD  dashboard ............................................................................................................... dashboard
  POST      email/verification-notification ............................ verification.send › Auth\EmailVerificationNotificationController@store
  GET|HEAD  forgot-password ........................................................ password.request › Auth\PasswordResetLinkController@create
  POST      forgot-password ........................................................... password.email › Auth\PasswordResetLinkController@store
  GET|HEAD  login .......................................................................... login › Auth\AuthenticatedSessionController@create
  POST      login ..................................................................... login.store › Auth\AuthenticatedSessionController@store
  POST      logout ....................................................................... logout › Auth\AuthenticatedSessionController@destroy
  GET|HEAD  register .......................................................................... register › Auth\RegisteredUserController@create
  POST      register ..................................................................... register.store › Auth\RegisteredUserController@store
  POST      reset-password .................................................................. password.store › Auth\NewPasswordController@store
  GET|HEAD  reset-password/{token} ......................................................... password.reset › Auth\NewPasswordController@create
  ANY       settings .................................................................................. Illuminate\Routing › RedirectController
  GET|HEAD  settings/appearance ........................................................................................... settings.appearance
  GET|HEAD  settings/password ............................................................ settings.password › Settings\PasswordController@edit
  PUT       settings/password ................................................... settings.password.update › Settings\PasswordController@update
  GET|HEAD  settings/profile ............................................................... settings.profile › Settings\ProfileController@edit
  PATCH     settings/profile ...................................................... settings.profile.update › Settings\ProfileController@update
  DELETE    settings/profile .................................................... settings.profile.destroy › Settings\ProfileController@destroy
  GET|HEAD  storage/{path} ...................................................................................................... storage.local
  GET|HEAD  up ................................................................................................................................ 
  GET|HEAD  verify-email ......................................................... verification.notice › Auth\EmailVerificationPromptController
  GET|HEAD  verify-email/{id}/{hash} ......................................................... verification.verify › Auth\VerifyEmailController

                                                                                                                            Showing [25] routes

If approved, I will apply similar changes to the Vue starter kit as well.

@pushpak1300 pushpak1300 marked this pull request as ready for review September 4, 2025 13:35
@joetannenbaum
Copy link
Contributor

I would actually prefer to stick with the existing convention. Adding settings before each route name is simply a reflection of where we currently use these routes in the UI, but has nothing to do with the action itself. So I'd prefer to update the Livewire kit with the React/Vue naming conventions than the other way around. In fact, I would probably update appearance to appearance.edit in React/Vue to be consistent.

Copy link
Contributor

@joetannenbaum joetannenbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment

@pushpak1300
Copy link
Member Author

I would actually prefer to stick with the existing convention. Adding settings before each route name is simply a reflection of where we currently use these routes in the UI, but has nothing to do with the action itself. So I'd prefer to update the Livewire kit with the React/Vue naming conventions than the other way around. In fact, I would probably update appearance to appearance.edit in React/Vue to be consistent.

Make sense. Will update it to follow other way around.

@pushpak1300 pushpak1300 closed this Sep 5, 2025
@pushpak1300 pushpak1300 deleted the feat/standardise_routes branch September 5, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants