Can there be a way to make routes look like Route::get(), Route::post etc. #211
Replies: 2 comments
-
@otengkwame Thanks for bringing this up 👍 I'm interested in what will be achieved by doing this? There are actually a few consequences changing our current behavior to support your suggested example (can't define interfaces etc.). In my honest opinion, I don't see anything positive gained by this other than using a similar syntax like other frameworks. What do you think? |
Beta Was this translation helpful? Give feedback.
-
It shouldn't be how the framework actually works, but I think I wanted a syntax like that. Looking at it, I think it is just syntactic sugar. I will figure out a way to make it work, that is if I can. It is a personal request, If you can help me |
Beta Was this translation helpful? Give feedback.
-
I once tried creating a class to use this style of routing which looks like a class calling it's static methods just as we see in other frameworks but it seems my level of understanding could not help me do that.
An example
Is there a way someone can assist me in achieving this? Or is there an advice to stop me from doing things in this manner?
Beta Was this translation helpful? Give feedback.
All reactions