Skip to content

Commit

Permalink
updating readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ipranjal committed May 29, 2018
1 parent ca0f17f commit a8000dc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ use Scrawler\Router\Router;
use Symfony\Component\HttpFoundation\Response;



$dir = /path/to/your/controllers;
$namespace = Namespace\of\your\controllers;

$collection = new RouteCollection($dir,$namespace);
$router = new Router($collection);
$router = new Router(new RouteCollection($dir,$namespace));
//Dispatch route and get back the response
$response = $router->dispatch();

Expand Down Expand Up @@ -79,7 +77,7 @@ The controller and function that would be invoked will be
class controller{

public function methodFunction(arguments1,arguments2){
//Defination goes here
//Definition goes here
}

}
Expand All @@ -96,7 +94,7 @@ would invoke following controller and method
class User{

public function getFind($id){
//Function defination goes here
//Function definition goes here
}
}
```
Expand Down

0 comments on commit a8000dc

Please sign in to comment.