Created
September 19, 2012 15:36
-
-
Save bgallagh3r/3750319 to your computer and use it in GitHub Desktop.
Laravel Controller - Sublime Text 2 Snippet
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
| <snippet> | |
| <content><![CDATA[ | |
| <?php | |
| class ${1}s_Controller extends Base_Controller { | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Parent Contstruct | |
| |-------------------------------------------------------------------------- | |
| */ | |
| public function __construct() | |
| { | |
| parent::__construct(); | |
| } | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Display ${1}s | |
| |-------------------------------------------------------------------------- | |
| */ | |
| public function action_index() | |
| { | |
| } | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Show single ${1} | |
| |-------------------------------------------------------------------------- | |
| */ | |
| public function action_show() | |
| { | |
| } | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Show form to create new ${1} | |
| |-------------------------------------------------------------------------- | |
| */ | |
| public function action_new() | |
| { | |
| } | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Show form to edit ${1} | |
| |-------------------------------------------------------------------------- | |
| */ | |
| public function action_edit() | |
| { | |
| } | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Create a new ${1} | |
| |-------------------------------------------------------------------------- | |
| */ | |
| public function action_create() | |
| { | |
| } | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Update existing ${1} | |
| |-------------------------------------------------------------------------- | |
| */ | |
| public function action_update() | |
| { | |
| } | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Delete existing ${1} | |
| |-------------------------------------------------------------------------- | |
| */ | |
| public function action_destroy() | |
| { | |
| } | |
| }]]></content> | |
| <tabTrigger>controller</tabTrigger> | |
| <scope>source.php</scope> | |
| <description>Laravel: Controller</description> | |
| </snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment