Created
June 24, 2013 19:30
-
-
Save tournasdim/5852790 to your computer and use it in GitHub Desktop.
A skeleton of a Laravel 4 Restfull Controller (not namespaced)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class TestController extends BaseController { | |
/** | |
* Setup the root action of this controller. | |
* | |
* @return void | |
*/ | |
public function getIndex() | |
{ | |
return "hello from getIndex action " ; | |
} | |
/** | |
* Setup the structure for a POST request. | |
* | |
* @return void | |
*/ | |
public function postIndex() | |
{ | |
return "hello from postIndex action " ; | |
} | |
/** | |
* Setup the structure for another get-action . | |
* | |
* @return void | |
*/ | |
public function getDimas() | |
{ | |
return "hello from getDimas action " ; | |
} | |
/** | |
* Setup a "Action not found" . | |
* | |
* @return void | |
*/ | |
public function missingMethod($parameters) | |
{ | |
return "Sorry this is not applicable" ; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment