package Ġcom . blog . blog ify Ċ Ċ import Ġcom . blog . blog ify . controllers . Blog Controller Ċ import Ġdev . al pas . routing . Route Group Ċ import Ġdev . al pas . routing . Router Ċ Ċ // Ġhttps :// al pas . dev / docs / routing Ċ fun ĠRouter . add Routes () Ġ= Ġapply Ġ{ ĊĠĠĠ Ġgroup Ġ{ ĊĠĠĠĠĠĠĠ Ġweb Routes Group () ĊĠĠĠ Ġ}. middleware Group (" web ") ĊĊĠĠĠ Ġapi Routes () Ċ } Ċ Ċ private Ġfun ĠRoute Group . web Routes Group () Ġ{ ĊĠĠĠ Ġget ("/", ĠBlog Controller :: index ). name (" welcome ") ĊĠĠĠ Ġget ("/ < page >", ĠBlog Controller :: pages ). name (" pages ") ĊĠĠĠ Ġget (" blog /< id >/< page >", ĠBlog Controller :: show ). name (" blog . show ") ĊĠĠĠ Ġget (" blog / new ", ĠBlog Controller :: new ). name (" blog . new ") ĊĠĠĠ Ġpost (" blog / submit ", ĠBlog Controller :: submit ). name (" blog . submit ") ĊĠĠĠ Ġget (" blog / edit /< id >", ĠBlog Controller :: edit ). name (" blog . edit ") ĊĠĠĠ Ġpatch (" blog / edit /< id >", ĠBlog Controller :: update ). name (" blog . update ") ĊĠĠĠ Ġdelete (" blog /< id >", ĠBlog Controller :: delete ). name (" blog . delete ") Ċ } Ċ Ċ private Ġfun ĠRouter . api Routes () Ġ{ ĊĠĠĠ Ġ// Ġregister ĠAPI Ġroutes Ġhere Ċ } ĊĊ