diff --git a/README.md b/README.md index 9de2d4f..ab2df01 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ getArticles, postUser, putResource ``` GETarticles, Postuser, PutResource ``` -

+
## 🏠 Website home page Scrawler Router uses a special function name `allIndex()` and special controller name `Main`. So If you want to make a controller for your landing page `\` the controller will be defines as follows @@ -160,7 +160,7 @@ class Main } } ``` -

+
## 🌟 Main Controller Class name with `Main` signifies special meaning in Scrawler Router , if you wanna define pages route URL you can use main controler @@ -186,7 +186,7 @@ class Main } } ``` -

+
## 👉 Index function Just like `Main` controller `allIndex(), getIndex(), postIndex()` etc signifies a special meaning , urls with only controller name and no function name will try to resolve into this function. @@ -207,7 +207,7 @@ class Hello } } ``` -

+
## 🔄 Redirection If you want to redirect a request you can return a Symphony redirect response @@ -226,7 +226,8 @@ class Hello // redirect to external urls return new RedirectResponse('http://example.com/'); - // Or alternatively you can set your arguments in flashback and redirect to internal URL + // Or alternatively you can set your arguments in flashbagk and redirect to internal URL + // Note you may use any flash manager to achieve this but as HttpFoundation is already a dependecy of Router here is a exmple with Symfony Session $session = new Session(); $session->start(); $session->getFlashBag()->add('notice', 'Profile updated'); @@ -235,9 +236,8 @@ class Hello } } ``` -

- -Infact from Scrawler Router 3.1.0 you can directly return object of [\Symfony\Component\HttpFoundation\Response](https://symfony.com/doc/current/components/http_foundation.html#response) +Infact from Scrawler Router 3.1.0 you can directly return object of [\Symfony\Component\HttpFoundation\Response](https://symfony.com/doc/current/components/http_foundation.html#response) from your controller +

## 👏 Supporters If you have reached here consider giving a star to help this project ❤️