rapolas.dev
  • Posts
  • Tags
rapolas.dev

  • Posts
  • Tags
How to structure and generate external URLs in Laravel

Organize, structure and generate external URLs with native Laravel route features. Avoid hardcoded strings for links, pre-process URLs and keep your code maintainable! In this short post I'll explain how you can use the internal Laravel's route feature set to generate your external URLs.

laravel structure
How to structure, define and reuse Laravel routes with PHP objects

Leverage PHP Class or Enum objects to structure your routes. Keep your code SOLID, DRY, avoid typos, and save time in the long term.

laravel structure php8.1