Skip to content

Commit

Permalink
Add router caching
Browse files Browse the repository at this point in the history
  • Loading branch information
malikumer committed Jul 27, 2018
2 parents d556e9a + 4b55806 commit a94ab39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions App/Models/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
class Post extends Model
{
public function get()
{
$db = new Mode;
{
$db = new Mode();
$db->method(); //example code
}
}
4 changes: 2 additions & 2 deletions routes/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
$router->add('middlewaretest', ['controller'=>'Home', 'action'=>'middlewaretest']);

//for test using closure
$router->add('user/{id:[0-9]}', function ($args) {
echo 'Example route using closure '.$args['id'] . " ".$args['name'];
$router->add('user/{id:[0-9]}', function ($args) {
echo 'Example route using closure '.$args['id'].' '.$args['name'];
});

//Cache the routes
Expand Down

0 comments on commit a94ab39

Please sign in to comment.