Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Route with parameters in menu.php


Hi sir,

How can I add route with parameters in menu.php? For example the declared route in web.php is

Route::get('test/{id}', 'TestController@index')->name('test.index);

array(
'title' => 'Test',
'path' => 'test/1',
'bullet' => '<span class="bullet bullet-dot"></span>',
),

How can I add the parameters without it being declared as new route?

Thank you


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (7)


It might be very challenging for people to pass the Microsoft MD-102 certification test. Either they don't have access to useful learning resources or they don't have the necessary information. One needs to have the precise Microsoft learning material in order to pass the Endpoint Administrator Exam. Only such material will make taking the Endpoint Administrator Exam and showing up for it simple.



You're welcome. Feel free to let us know if you need any help.

Thanks


Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.

Hi,

The config is for pages.php.

The 'view' => 'test/index' go through controller first. You can see it here.
app/Http/Controllers/PagesController.php

Thanks


 

Thank you very much,



Hi aveimoug,

Could you please try to use the config like this?


"test" => array(
"title" => "Test",
"*" => array(
"title" => "Show Text",
"edit" => array(
"title" => "Edit Test",
),
),
),



Thanks


 

Thank you, it helps a lot. I put it into the pages.php

I'm sorry, I want to ask another question,

For example I declared it as below:

'test' => array(
'title' => 'Test',
'view' => 'test/index',
'*' => array(
'title' => 'Show Text',
'edit' => array(
'title' => 'Edit Test',
),
),
),

Will the 'view' => 'test/index' go through controller first or will it jump to the blade file without going to controller?

Your help and support is greatly appreciated.

Thank you


 

Thank you for your reply, will this be in menu.php or pages.php?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(