Created
April 14, 2016 01:53
-
-
Save edupacios/764dd8d5e37c61693850b04f7eca2e5c to your computer and use it in GitHub Desktop.
Visual Studio Code PHP snippets
This file contains 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
{ | |
"New php class": { | |
"prefix": "cla", | |
"body": [ | |
"<?php", | |
"", | |
"namespace ${1:namespace};", | |
"", | |
"class ${2}", | |
"{", | |
"\t${3}", | |
"}" | |
], | |
"description": "Create new php class." | |
}, | |
"New php public method": { | |
"prefix": "met", | |
"body": [ | |
"public function ${name}(${2})", | |
"{", | |
"\t${3}", | |
"}" | |
], | |
"description": "Create new php public method." | |
}, | |
"New php protected method": { | |
"prefix": "pmet", | |
"body": [ | |
"protected function ${name}(${2})", | |
"{", | |
"\t${3}", | |
"}" | |
], | |
"description": "Create new php protected method." | |
}, | |
"New php class constructor": { | |
"prefix": "_c", | |
"body": [ | |
"public function __construct(${1})", | |
"{", | |
"\t${2}", | |
"}" | |
], | |
"description": "Create new php class constructor." | |
}, | |
"New Laravel route:get": { | |
"prefix": "Route:get", | |
"body": [ | |
"Route::get('${1:URI}', ['as' => '${2:name}', 'uses' => '${3:controller@}@${4:method}']);" | |
], | |
"description": "Create new get route in laravel." | |
}, | |
"New Laravel route:post": { | |
"prefix": "Route:post", | |
"body": [ | |
"Route::post('${1:URI}', ['as' => '${2:name}', 'uses' => '${3:controller@}@${4:method}']);" | |
], | |
"description": "Create new post route in laravel." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment