-
-
Save AbiruzzamanMolla/b10301d5b95c13b4cef78723234dbd7e to your computer and use it in GitHub Desktop.
PHP/Laravel Live snippets for VSCode
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
{ | |
"Create public function": { | |
"prefix": "pubf", | |
"body": [ | |
"public function $1()", | |
"{", | |
"\t$2", | |
"}", | |
], | |
"description": "Create public function" | |
}, | |
"Create private function": { | |
"prefix": "prif", | |
"body": [ | |
"private function $1()", | |
"{", | |
"\t$2", | |
"}", | |
], | |
"description": "Create private function" | |
}, | |
"Create protected function": { | |
"prefix": "prof", | |
"body": [ | |
"protected function $1()", | |
"{", | |
"\t$2", | |
"}", | |
], | |
"description": "Create protected function" | |
}, | |
"Create public static function": { | |
"prefix": "pubsf", | |
"body": [ | |
"public static function $1()", | |
"{", | |
"\t$2", | |
"}", | |
], | |
"description": "Create public static function" | |
}, | |
"Create private static function": { | |
"prefix": "prif", | |
"body": [ | |
"private static function $1()", | |
"{", | |
"\t$2", | |
"}", | |
], | |
"description": "Create private static function" | |
}, | |
"Create protected static function": { | |
"prefix": "prof", | |
"body": [ | |
"protected static function $1()", | |
"{", | |
"\t$2", | |
"}", | |
], | |
"description": "Create protected static function" | |
}, | |
"Create public function with belongsTo": { | |
"prefix": "belongs", | |
"body": [ | |
"public function $1()", | |
"{", | |
"\treturn \\$this->belongsTo($2::class);", | |
"}", | |
], | |
"description": "Create public function with belongsTo" | |
}, | |
"Create public function with has many": { | |
"prefix": "hasm", | |
"body": [ | |
"public function $1()", | |
"{", | |
"\treturn \\$this->hasMany($2::class);", | |
"}", | |
], | |
"description": "Create public function with has many" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment