// launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Laravel XDebug",
"type": "php",
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
// Place this snippet in php.json to allow it only in PHP files | |
{ | |
// Other Snippets Here | |
"Convert PHP function to arrow function": { | |
"prefix": "convertToArrow", | |
"body": [ | |
"${TM_SELECTED_TEXT/function\\s*\\(([^)]*)\\)\\s*\\{\\s*return\\s+([^;]+);\\s*\\}/fn($1) => $2/}" | |
], |
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
{ | |
"Vue sass division wrap": { | |
"prefix": "mathdiv", | |
"body": ["math.div($TM_SELECTED_TEXT)"], | |
"description": "Wrap selection with math.div() to address deprecated sass division syntax" | |
} | |
} |
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
// ./routes/api/index.js | |
// the router is already using /api (see routes/index.js), so this is actually a post to /api/ | |
router.post('/', function(req, res) { | |
// we have to wrap our *await* commands in | |
// an async function for them to work | |
(async () => { | |
// Generate the PDF | |
. | |
. |