andresgutgon
Phoenix named routes only the last part
Hi, nice to meet you. This is my first question in the forum ![]()
I’m trying to develop a package for Phoenix to generate routes in typescript files to be used in my frontend which is done with Inertia.js. What I want is exactly like this Laravel package
https://github.com/laravel/wayfinder
They have two folders
- actions → all the routes
- routes → only named routes
In Laravel route they have a way of getting this info. If the route is named or not. Phoenix also have this info but the problem is that the named route comes in a route property called “helper” but it comes with all the scope of the route. I just want the last part so methods generated in Typescript are nice and shot
More details can be found in my repo in this issue
https://github.com/andresgutgon/phoenix-wayfinder/issues/4
Thanks for the help!
Most Liked
BartOtten
Welcome @andresgutgon!
:as- a string or atom containing the named helper scope. When set to false, it resets the nested helper scopes. Has no effect when using verified routes exclusively
So scope /some, as: false would do I guess.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









