{"action":"created","issue":{"url":"https://api.github.com/repos/LaravelCollective/html/issues/515","repository_url":"https://api.github.com/repos/LaravelCollective/html","labels_url":"https://api.github.com/repos/LaravelCollective/html/issues/515/labels{/name}","comments_url":"https://api.github.com/repos/LaravelCollective/html/issues/515/comments","events_url":"https://api.github.com/repos/LaravelCollective/html/issues/515/events","html_url":"https://github.com/LaravelCollective/html/issues/515","id":316544055,"node_id":"MDU6SXNzdWUzMTY1NDQwNTU=","number":515,"title":"Multiple parameters in a route","user":{"login":"gettedgui","id":38214698,"node_id":"MDQ6VXNlcjM4MjE0Njk4","avatar_url":"https://avatars2.githubusercontent.com/u/38214698?v=4","gravatar_id":"","url":"https://api.github.com/users/gettedgui","html_url":"https://github.com/gettedgui","followers_url":"https://api.github.com/users/gettedgui/followers","following_url":"https://api.github.com/users/gettedgui/following{/other_user}","gists_url":"https://api.github.com/users/gettedgui/gists{/gist_id}","starred_url":"https://api.github.com/users/gettedgui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gettedgui/subscriptions","organizations_url":"https://api.github.com/users/gettedgui/orgs","repos_url":"https://api.github.com/users/gettedgui/repos","events_url":"https://api.github.com/users/gettedgui/events{/privacy}","received_events_url":"https://api.github.com/users/gettedgui/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-22T02:55:18Z","updated_at":"2018-06-15T02:30:48Z","closed_at":null,"author_association":"NONE","body":"I try everything I think to use multiple parameters in a route (one is conditional) and always return the value by default that I put on the controller.\r\n\r\nCan you help me sending some simple example code using multiple parameters (one conditional) so I can advance in my project\r\n\r\nThis is one the code I used:\r\n\r\nblade file\r\n\r\n```\r\n{!! Form::open(['style'  => 'display: inline;',]) !!}\r\n                                <div class=\"btn-group btn-group-xs pull-right\" role=\"group\">\r\n  \r\n                                    <a href=\"{{ route('ventasproductos.facturas', [$product->id]) }}\" \r\n                                        class=\"btn btn-primary\" \r\n                                        title=\"{{ trans('ventasproductos.facturastodas') }}\">\r\n                                            <span class=\"material-icons\" \r\n                                                style=\"font-size:10px;color:white\" \r\n                                                aria-hidden=\"true\">\r\n                                                monetization_on\r\n                                            </span>\r\n                                    </a>\r\n                                    \r\n                                    <a href=\"{{ route('ventasproductos.facturas', [$product->id, 'true']) }}\" \r\n                                        class=\"btn btn-success\" \r\n                                        title=\"{{ trans('ventasproductos.facturassindeudas') }}\">\r\n                                            <span class=\"material-icons\" \r\n                                                style=\"font-size:10px;color:white\" \r\n                                                aria-hidden=\"true\">\r\n                                                monetization_on\r\n                                            </span>\r\n                                    </a>\r\n\r\n                                    <a href=\"{{ route('ventasproductos.facturas', [$product->id, 'false']) }}\" \r\n                                        class=\"btn btn-danger\" \r\n                                        title=\"{{ trans('ventasproductos.facturascondeudas') }}\">\r\n                                            <span class=\"material-icons\" \r\n                                                style=\"font-size:10px;color:white\" \r\n                                                aria-hidden=\"true\">\r\n                                                monetization_on\r\n                                            </span>\r\n                                    </a>    \r\n                                   \r\n                                </div>\r\n                            {!! Form::close() !!}\r\n\r\n```\r\n\r\ncontroller\r\n\r\n```\r\npublic function facturas($id, $canceled = 'Hi there')\r\n   {\r\n       dd($canceled);\r\n       return 'Hola ';\r\n   }\r\n```\r\n\r\n\r\nThe route\r\n\r\n        Route::get('/facturas/{id}/canceled/{canceled?}', 'VentaProductosController@facturas')\r\n            ->name('ventasproductos.facturas');\r\n\r\n\r\nThanks for your time and help"},"comment":{"url":"https://api.github.com/repos/LaravelCollective/html/issues/comments/397495282","html_url":"https://github.com/LaravelCollective/html/issues/515#issuecomment-397495282","issue_url":"https://api.github.com/repos/LaravelCollective/html/issues/515","id":397495282,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzQ5NTI4Mg==","user":{"login":"ronappleton","id":3792420,"node_id":"MDQ6VXNlcjM3OTI0MjA=","avatar_url":"https://avatars1.githubusercontent.com/u/3792420?v=4","gravatar_id":"","url":"https://api.github.com/users/ronappleton","html_url":"https://github.com/ronappleton","followers_url":"https://api.github.com/users/ronappleton/followers","following_url":"https://api.github.com/users/ronappleton/following{/other_user}","gists_url":"https://api.github.com/users/ronappleton/gists{/gist_id}","starred_url":"https://api.github.com/users/ronappleton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronappleton/subscriptions","organizations_url":"https://api.github.com/users/ronappleton/orgs","repos_url":"https://api.github.com/users/ronappleton/repos","events_url":"https://api.github.com/users/ronappleton/events{/privacy}","received_events_url":"https://api.github.com/users/ronappleton/received_events","type":"User","site_admin":false},"created_at":"2018-06-15T02:30:48Z","updated_at":"2018-06-15T02:30:48Z","author_association":"NONE","body":"try \r\n```\r\n<a href=\"{{ route('ventasproductos.facturas', ['id' => $product->id, 'canceled' => 'false']) }}\" \r\n                                        class=\"btn btn-danger\" \r\n                                        title=\"{{ trans('ventasproductos.facturascondeudas') }}\">\r\n                                            <span class=\"material-icons\" \r\n                                                style=\"font-size:10px;color:white\" \r\n                                                aria-hidden=\"true\">\r\n                                                monetization_on\r\n                                            </span>\r\n                                    </a> \r\n```\r\n\r\nand \r\n```\r\n<a href=\"{{ route('ventasproductos.facturas', ['id' => $product->id]) }}\" \r\n                                        class=\"btn btn-primary\" \r\n                                        title=\"{{ trans('ventasproductos.facturastodas') }}\">\r\n                                            <span class=\"material-icons\" \r\n                                                style=\"font-size:10px;color:white\" \r\n                                                aria-hidden=\"true\">\r\n                                                monetization_on\r\n                                            </span>\r\n                                    </a>\r\n```"}}
{"actor":{"display_login":"ronappleton"}}