{"id":4677,"date":"2020-07-27T04:14:11","date_gmt":"2020-07-27T01:14:11","guid":{"rendered":"https:\/\/elzero.org\/?p=4677"},"modified":"2020-07-27T04:14:30","modified_gmt":"2020-07-27T01:14:30","slug":"laravel-routes-wild-cards","status":"publish","type":"post","link":"https:\/\/elzero.org\/old\/laravel-routes-wild-cards\/","title":{"rendered":"Routes &#8211; Wild Cards"},"content":{"rendered":"<h3>\u0627\u0644 Code \u0627\u0644\u0645\u0648\u062c\u0648\u062f \u0641\u064a \u0627\u0644\u062f\u0631\u0633<\/h3>\r\n\r\n<div class=\"file-name\">routes\/web.php<\/div>\r\n\r\n<script type=\"text\/plain\" class=\"language-php\">\r\nRoute::get('\/', function () {\r\n    return view('welcome');\r\n});\r\n\r\nRoute::get('\/about-me', function () {\r\n    return view(\"about\", []);\r\n});\r\n\r\n\/\/ (URI, View, Array Of Data)\r\n\r\nRoute::view('contact-me', \"contact\", [\r\n    'page_name' => 'Contact Me Page',\r\n    'page_description' => \"<script>This Is Description&lt;\/script>\"\r\n]);\r\n\r\nRoute::get('category\/{id}', function ($id) {\r\n\r\n    $cats = [\r\n        '1' => 'Games',\r\n        '2' => 'Programming',\r\n        '3' => 'Books'\r\n    ];\r\n\r\n    return view(\"category\", [\r\n        'the_id' => $cats[$id] ?? \"This Id Is Not Found\"\r\n    ]);\r\n});\r\n<\/script>\r\n\r\n<h3>\u0645\u0644\u0627\u062d\u0638\u0627\u062a \u0627\u0644\u062f\u0631\u0633<\/h3>\r\n\u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0644\u0627\u062d\u0638\u0627\u062a \u062d\u0627\u0644\u064a\u0627","protected":false},"excerpt":{"rendered":"<p>\u0627\u0644 Code \u0627\u0644\u0645\u0648\u062c\u0648\u062f \u0641\u064a \u0627\u0644\u062f\u0631\u0633 routes\/web.php \u0645\u0644\u0627\u062d\u0638\u0627\u062a \u0627\u0644\u062f\u0631\u0633 \u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0644\u0627\u062d\u0638\u0627\u062a \u062d\u0627\u0644\u064a\u0627<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[715],"tags":[],"class_list":["post-4677","post","type-post","status-publish","format-standard","hentry","category-mastering-laravel"],"_links":{"self":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/4677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/comments?post=4677"}],"version-history":[{"count":2,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/4677\/revisions"}],"predecessor-version":[{"id":4679,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/4677\/revisions\/4679"}],"wp:attachment":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/media?parent=4677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/categories?post=4677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/tags?post=4677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}