Skip to content

Instantly share code, notes, and snippets.

@bgallagh3r
Created September 19, 2012 15:36
Show Gist options
  • Select an option

  • Save bgallagh3r/3750319 to your computer and use it in GitHub Desktop.

Select an option

Save bgallagh3r/3750319 to your computer and use it in GitHub Desktop.
Laravel Controller - Sublime Text 2 Snippet
<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