Customising Routes

Peddle registers its own routes. By default, they have /peddle/* prefix, but you can also adjust that in config.

If you want your entire app to be just Peddle pages – like the official Peddle site works – then you can set the prefix to an empty string.

Now, instead of going to /peddle/login to log in, you can go to /login. You'll probably want to customise the home page template, at least...

Route Lookup Table

These are the routes that Peddle registers

method route name url special requirements
get peddle-auth-show-login-page /login none
post peddle-auth-log-user-in /login none
get peddle-auth-show-register-page /register none
post peddle-auth-register-user /register none
get peddle-auth-show-forgot-password-page /password/reset none
post peddle-auth-send-password-reset-email /password/email none
get peddle-auth-show-reset-password-page /password/reset/{token} none
post peddle-auth-reset-password /password/reset none
post peddle-handle-paddle-webhook /webhook verified paddle message
get peddle-show-topic-page /topics/{slug} none
get peddle-show-topics-page /topics none
get peddle-show-home-page / none
post peddle-auth-log-user-out /logout peddle auth
get peddle-auth-show-verify-page /email/verify peddle auth
post peddle-auth-send-verify-email /email/resend peddle auth
get peddle-auth-verify-user-email /email/verify/{id}/{hash} peddle auth, signed url
get peddle-auth-show-confirm-password-page /password/confirm peddle auth, verification
post peddle-auth-confirm-user-password /peddle-auth-confirm-user-password peddle auth, verification
get peddle-show-billing-page /billing peddle auth, verification, password confirmation
get peddle-change-subscription /subscription/change/{planId} peddle auth, verification
get peddle-show-dashboard-page /dashboard peddle auth, verification
get peddle-show-settings-page /settings peddle auth, verification
get peddle-show-admin-page /admin peddle auth, verification, admin email

Here are some important things to note:

  • All routes that do work are throttled, using Laravel's default throttling middleware.
  • peddle auth is any user authenticated with the Peddle guard.
  • verification can be selectively enabled (and will be ignored if disabled) in config.
  • admin email means the Peddle authenticated user has an email address that matches the list of email addresses that indicate whether the user is an admin or not. Add emails to that config list to add new admin users.