-
Notifications
You must be signed in to change notification settings - Fork 60
/
crud.sublime-snippet
49 lines (36 loc) · 977 Bytes
/
crud.sublime-snippet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<snippet>
<content><![CDATA[
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class ${1:${TM_FILENAME/(.+)\..+|.*/\u$1/:Controllername}} extends ${2:CI}_Controller {
public function __construct()
{
parent::__construct();
${0://Load Dependencies}
}
// List all your items
public function index( \$offset = 0 )
{
}
// Add a new item
public function add()
{
}
//Update one item
public function update( \$id = NULL )
{
}
//Delete one item
public function delete( \$id = NULL )
{
}
}
/* End of file ${TM_FILENAME:${1/(.+)/\l$1.php/}} */
/* Location: ./${TM_FILEPATH/.+((?:application).+)/$1/:application/controllers/${1/(.+)/\l$1.php/}} */
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>crud</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.html</scope>
<description>CI - Simple CRUD Controller</description>
</snippet>