Menu Builder with Dynamic Routes

Posted In Voyager
  • jim-adamek 2 years ago
    Hi Again,
    
    As I set up Laravel Voyager, in most cases I want my users to see only their posts, images, or users within their group or company. I know that I will need to use the Menu Builder with Link Type selected as Dynamic Route to accomplish this. 
    
    Can anyone explain or give some examples of how we enter the Route and Route Parameters so they work together? For instance if I want a user to see only their posts would Menu Builder look like this:
    
        Route:   /admin/posts/{id} 
    		Parameter for the logged in user:  $user->id
    		
    Is that how the route and parameter would be formatted?
    
    Or if I wanted a user to see only users in their company would that look like this in Menu Builder:
    
        Route:  /admin/user/{company_id}
    	  Parameter for user like: $user->company_id
    
    Thanks for your help on this in advance!

    Hi Again,

    As I set up Laravel Voyager, in most cases I want my users to see only their posts, images, or users within their group or company. I know that I will need to use the Menu Builder with Link Type selected as Dynamic Route to accomplish this.

    Can anyone explain or give some examples of how we enter the Route and Route Parameters so they work together? For instance if I want a user to see only their posts would Menu Builder look like this:

    Route:   /admin/posts/{id} 
    	Parameter for the logged in user:  $user->id
    	
    

    Is that how the route and parameter would be formatted?

    Or if I wanted a user to see only users in their company would that look like this in Menu Builder:

    Route:  /admin/user/{company_id}
      Parameter for user like: $user->company_id
    

    Thanks for your help on this in advance!

  • tnylea 2 years ago
    Hey Jim,
    
    That's actually a good question and that feature needs to be documented. I believe that Mark may have been working on that one, so we'll have to see if he can chime in here and let us know how the dynamic menu routes work. I'm certain I will be looking into this myself as I want to continue creating more videos about how to use all these awesome new features.
    
    I'll see if Mark can shed some more light on this; otherwise I will be taking a look at it more this weekend and keep you posted with what I find out.
    
    Thanks again for using the forums. I really want this to be a good place where people can come ask a question and get some assistance.
    
    Talk to you soon.

    Hey Jim,

    That's actually a good question and that feature needs to be documented. I believe that Mark may have been working on that one, so we'll have to see if he can chime in here and let us know how the dynamic menu routes work. I'm certain I will be looking into this myself as I want to continue creating more videos about how to use all these awesome new features.

    I'll see if Mark can shed some more light on this; otherwise I will be taking a look at it more this weekend and keep you posted with what I find out.

    Thanks again for using the forums. I really want this to be a good place where people can come ask a question and get some assistance.

    Talk to you soon.

  • joao-viana 10 months ago
    Do you have the aswer for that?

    Do you have the aswer for that?

  • mateo-gavin 4 months ago
     Dynamic route can help so many of us to know what will happen when things are not going to be there for [Austin Foundation Repair](https://austin.smartfoundationrepair.net) if the things are there, then we need to know further about it.

    Dynamic route can help so many of us to know what will happen when things are not going to be there for Austin Foundation Repair if the things are there, then we need to know further about it.

Please login or signup to leave a response.

Login

or Sign Up

Sign Up

or Login
×
Want to create your own SAAS?

I can teach you to create your own Software as a Service. Click here to learn more!

Visit SAAS Adventure!