Skip to content

Commit 2a02b9c

Browse files
author
IANirab
committed
fix some bugs
1 parent 89b97f7 commit 2a02b9c

File tree

2 files changed

+24
-31
lines changed

2 files changed

+24
-31
lines changed

snippets/controller.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,27 @@
2222
"controller-store-function": {
2323
"prefix": "store",
2424
"body": [
25-
"public function store(Request $request)",
25+
"public function store(Request \\$request)",
2626
"{",
27-
"return $request->all();",
27+
"return \\$request->all();",
2828
"}"
2929
],
3030
"description": "Create Store Function"
3131
},
3232
"controller-update-function": {
3333
"prefix": "update",
3434
"body": [
35-
"public function update(Request $request,$id)",
35+
"public function update(Request \\$request,\\$id)",
3636
"{",
37-
"return $request->all();",
37+
"return \\$request->all();",
3838
"}"
3939
],
4040
"description": "Create Update Function"
4141
},
4242
"controller-show-function": {
4343
"prefix": "show",
4444
"body": [
45-
"public function show($id)",
45+
"public function show(\\$id)",
4646
"{",
4747
"${1:# code...}",
4848
"}"
@@ -52,7 +52,7 @@
5252
"controller-edit-function": {
5353
"prefix": "edit",
5454
"body": [
55-
"public function edit($id)",
55+
"public function edit(\\$id)",
5656
"{",
5757
"${1:# code...}",
5858
"}"
@@ -62,7 +62,7 @@
6262
"controller-destroy-function": {
6363
"prefix": "destroy",
6464
"body": [
65-
"public function destroy($id)",
65+
"public function destroy(\\$id)",
6666
"{",
6767
"${1:# code...}",
6868
"}"
@@ -94,14 +94,14 @@
9494
"controller-sput-function": {
9595
"prefix": "sput",
9696
"body": [
97-
"Session::put('',$variable);"
97+
"Session::put('',\\$variable);"
9898
],
9999
"description": "use Session::put()"
100100
},
101101
"controller-auth-attempt": {
102102
"prefix": "authattempt",
103103
"body": [
104-
"if (Auth::attempt(['email'=>$request->email,'password'=>$request->password])) {",
104+
"if (Auth::attempt(['email'=>\\$request->email,'password'=>\\$request->password])) {",
105105
"${1:#code...}",
106106
"}"
107107
],

snippets/model.json

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
{
2-
"protected-table": {
3-
"prefix": "pt",
4-
"body": [
5-
"protected $table = '';"
6-
],
7-
"description": "Rewrite $table"
8-
},
9-
"protected-fillable": {
10-
"prefix": "pfill",
11-
"body": [
12-
"protected $fillable = [];"
13-
],
14-
"description": "fillable array"
15-
},
16-
"protected-all": {
17-
"prefix": "pall",
18-
"body": [
19-
"protected $table = '';",
20-
"protected $fillable = [];"
21-
],
22-
"description": "create table & fillable also "
23-
}
2+
"protected-table": {
3+
"prefix": "pt",
4+
"body": ["protected \\$table = '';"],
5+
"description": "Rewrite $table"
6+
},
7+
"protected-fillable": {
8+
"prefix": "pfill",
9+
"body": ["protected \\$fillable = [];"],
10+
"description": "fillable array"
11+
},
12+
"protected-all": {
13+
"prefix": "pall",
14+
"body": ["protected \\$table = '';", "protected \\$fillable = [];"],
15+
"description": "create table & fillable also "
16+
}
2417
}

0 commit comments

Comments
 (0)