Skip to content

Instantly share code, notes, and snippets.

@guifelix
Last active August 22, 2024 13:39
Show Gist options
  • Save guifelix/364e45bedd842976bbae071a176f396a to your computer and use it in GitHub Desktop.
Save guifelix/364e45bedd842976bbae071a176f396a to your computer and use it in GitHub Desktop.
Laravel dd snippet for vscode
{
"laravel debug and die": {
"scope": "php,blade",
"prefix": "dd",
"body": [
"$LINE_COMMENT@TODO: Remove this dd | Author | $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE",
"dd(",
" '$RELATIVE_FILEPATH:'.__LINE__,",
" $1",
");",
],
"description": "dd"
},
"todo": {
"scope": "php,blade,vue,js",
"prefix": "td",
"body": [
"$LINE_COMMENT@TODO: $1 | $RELATIVE_FILEPATH | author | $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE"
],
"description": "todo"
},
"todo-list": {
"scope": "php",
"prefix": "tdl",
"body": [
"$BLOCK_COMMENT_START",
" $1",
"$BLOCK_COMMENT_END"
],
"description": "todo"
},
"log::debug": {
"scope": "php",
"prefix": "ld",
"body": [
"\\Log::debug(",
" '$RELATIVE_FILEPATH:'.__LINE__,",
" [$1]",
");"
]
},
"public function": {
"scope": "php",
"prefix": "pf",
"body": [
"public function $methodName($params)$returnType",
"{",
" $logic",
"}",
]
},
"public static function": {
"scope": "php",
"prefix": "psf",
"body": [
"public function static $methodName($params)$returnType",
"{",
" $logic",
"}",
]
},
"private function": {
"scope": "php",
"prefix": "pif",
"body": [
"private function $methodName($params)$returnType",
"{",
" $logic",
"}",
]
},
"protected": {
"scope": "php",
"prefix": "pof",
"body": [
"protected function $methodName($params)$returnType",
"{",
" $logic",
"}",
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment