Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Get route by name #5

Merged
merged 1 commit into from May 31, 2023

Conversation

crosa7
Copy link
Contributor

@crosa7 crosa7 commented May 20, 2023

Description

  • This introduces a method to return a route url by its name

  • The main usage idea behind this is, when we want to render some href in a template we would always have to pass the full route url. With this, we can simply define a route with a name and then in the templates we only need to call app()->route('route-name') and that is it, we get the url

Let me know if this makes sense or maybe something like this already exists in the framework and I didn't found. Either way, feel free to close it if it does not make sense

- This introduces a method to return a route url by its name

- The main usage idea behind this is, when we want to render some href in a template we would always have to pass the full route url.
With this, we can simply define a route with a name and then in the templates we only need to call app()->route('route-name') and that is it, we get the url
@mychidarko mychidarko merged commit ce092ed into leafsphp:main May 31, 2023
12 checks passed
@crosa7 crosa7 deleted the feature-get-route-by-name branch June 1, 2023 07:39
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.

None yet

2 participants