made controllers restful by default.

This commit is contained in:
Taylor Otwell
2011-11-04 21:57:40 -05:00
parent 16a62193fc
commit 88e6143338
2 changed files with 14 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
<?php namespace Laravel\Routing;
use Laravel\IoC;
use Laravel\Request;
use Laravel\Response;
abstract class Controller {
@@ -118,7 +119,9 @@ abstract class Controller {
if (is_null($response))
{
$response = call_user_func_array(array($this, $method), $parameters);
$verb = strtolower(Request::method());
$response = call_user_func_array(array($this, "{$verb}_{$method}"), $parameters);
}
// The after filter and the framework expects all responses to