-
-
Save martinandersen3d/d54ce8f115326f4db631451aaa9e2fa6 to your computer and use it in GitHub Desktop.
Visual Studio Code Settings Sync Gist
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
{"lastUpload":"2020-02-11T15:12:25.221Z","extensionVersion":"v3.4.3"} |
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
[ | |
{ | |
"metadata": { | |
"id": "e337c67b-55c2-4fef-8949-eb260e7fb7fd", | |
"publisherId": "Shan.code-settings-sync", | |
"publisherDisplayName": "Shan" | |
}, | |
"name": "code-settings-sync", | |
"publisher": "Shan", | |
"version": "3.4.3" | |
}, | |
{ | |
"metadata": { | |
"id": "5db78037-f674-459f-a236-db622c427c5b", | |
"publisherId": "PKief.material-icon-theme", | |
"publisherDisplayName": "PKief" | |
}, | |
"name": "material-icon-theme", | |
"publisher": "PKief", | |
"version": "3.9.3" | |
}, | |
{ | |
"metadata": { | |
"id": "93ce222b-5f6f-49b7-9ab1-a0463c6238df", | |
"publisherId": "ms-vscode-remote.remote-containers", | |
"publisherDisplayName": "ms-vscode-remote" | |
}, | |
"name": "remote-containers", | |
"publisher": "ms-vscode-remote", | |
"version": "0.94.0" | |
}, | |
{ | |
"metadata": { | |
"id": "f0c5397b-d357-4197-99f0-cb4202f22818", | |
"publisherId": "ms-vscode-remote.remote-wsl", | |
"publisherDisplayName": "ms-vscode-remote" | |
}, | |
"name": "remote-wsl", | |
"publisher": "ms-vscode-remote", | |
"version": "0.41.9" | |
}, | |
{ | |
"metadata": { | |
"id": "2f5dd8cb-d251-4d70-abfe-ddebcb077483", | |
"publisherId": "octref.vetur", | |
"publisherDisplayName": "octref" | |
}, | |
"name": "vetur", | |
"publisher": "octref", | |
"version": "0.23.0" | |
}, | |
{ | |
"metadata": { | |
"id": "7c15d326-cfdd-4932-9409-634b512daebe", | |
"publisherId": "MS-CEINTL.vscode-language-pack-ko", | |
"publisherDisplayName": "MS-CEINTL" | |
}, | |
"name": "vscode-language-pack-ko", | |
"publisher": "MS-CEINTL", | |
"version": "1.41.2" | |
} | |
] |
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
c9a9fc61a2940b4575086201867a7b4e190b5623d8a9b3d51b64d55f3baca5a7d4fe0a86dbca8f2ea48bae224f8afc9d237115a52391c50560f73141d78584196028238702332bf9a4da17a26f16616a928087b321dcc8d9777b2935213595173e445749990e4fba07903bad0a289fcd58618d413201619cab7ee9c991e50dfcd770e403fe5d37073da90ad538992fe45b8b797ed04805555cfe1a6b75ca5f2749a965ffbb915890654bae791b247481003bf3b7b313b01f8d6bd7c30f74f546a1e61c0760becd386101db63e38cb61a0c4805ec75b59eb5beca97c0b39b32b5 |
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
{ | |
"extensions": [ | |
"MS-CEINTL.vscode-language-pack-ko" | |
] | |
} |
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
{ | |
"extensions": [ | |
"bmewburn.vscode-intelephense-client", | |
"eamodio.gitlens", | |
"felixfbecker.php-debug", | |
"felixfbecker.php-intellisense", | |
"felixfbecker.php-pack", | |
"HookyQR.beautify", | |
"jmrog.vscode-nuget-package-manager", | |
"MS-CEINTL.vscode-language-pack-ko", | |
"ms-vscode.cpptools", | |
"octref.vetur", | |
"rexshi.phpdoc-comment-vscode-plugin", | |
"searKing.preview-vscode", | |
"VisualStudioExptTeam.vscodeintellicode", | |
"wmaurer.change-case" | |
], | |
"workspaceFolder": "/var/www" | |
} |
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
// 키 바인딩을 이 파일에 넣어서 기본값을 덮어씁니다. | |
[ | |
{ "key": "ctrl+u", "command": "editor.action.transformToUppercase", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+l", "command": "editor.action.transformToLowercase", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+shift+/", "command": "editor.action.addCommentLine", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+shift+\\", "command": "editor.action.removeCommentLine", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+r", "command": "editor.action.deleteLines", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+alt+q", | |
"command": "mysql.runQuery", | |
"when": "editorLangId == 'sql'" | |
}, | |
{ | |
"key": "ctrl+alt+e", | |
"command": "-mysql.runQuery", | |
"when": "editorLangId == 'sql'" | |
}, | |
{ | |
"key": "ctrl+shift+q", | |
"command": "mysql.newQuery" | |
} | |
] |
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
// Empty |
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
{ | |
"workbench.sideBar.location": "left", | |
"editor.tabCompletion": "on", | |
"editor.lineNumbers": "on", | |
"editor.fontFamily": "'나눔고딕코딩', 'DejaVu Sans', 'Courier New', monospace", | |
"editor.fontSize": 16, | |
"editor.renderIndentGuides": true, | |
"window.zoomLevel": -1, | |
"editor.autoClosingBrackets": "never", | |
"editor.minimap.enabled": true, | |
"editor.dragAndDrop": true, | |
"editor.cursorStyle": "line", | |
"typescript.check.npmIsInstalled": false, | |
"editor.renderWhitespace": "none", | |
"editor.insertSpaces": false, | |
"html.format.indentInnerHtml": true, | |
"window.menuBarVisibility": "default", | |
"editor.cursorBlinking": "solid", | |
"editor.smoothScrolling": false, | |
"editor.mouseWheelZoom": true, | |
"workbench.editor.highlightModifiedTabs": true, | |
"workbench.iconTheme": "material-icon-theme", | |
"sync.gist": "79bd14d1c30391ce6053faa5c4fa1a99", | |
"breadcrumbs.enabled": true, | |
"git.confirmSync": false, | |
"explorer.confirmDragAndDrop": false, | |
"sync.forceDownload": true, | |
"gitlens.views.repositories.files.layout": "list", | |
"git.autofetch": true, | |
"sync.autoUpload": true, | |
"sync.autoDownload": false, | |
"sync.forceUpload": false, | |
"php.suggest.basic": false, | |
"php.validate.enable": false, | |
"php.validate.run": "onType", | |
"editor.suggestSelection": "first" | |
} |
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
{ | |
/* | |
// Place your snippets for HTML here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
"Print to console": { | |
"prefix": "log", | |
"body": [ | |
"console.log('$1');", | |
"$2" | |
], | |
"description": "Log output to console" | |
} | |
*/ | |
/* Markup */ | |
"floatingInput": { | |
"prefix": "form.floating.wrapper", | |
"body": [ | |
"<div class='form-group label-floating'></div>", | |
], | |
"description": "floating div class" | |
}, | |
"floatingInputLabel": { | |
"prefix": "form.floating.label_control", | |
"body": [ | |
"<label class='control-label'>${id:text}</label>", | |
], | |
"description": "floating label" | |
} | |
} |
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
{ | |
/* | |
// Place your snippets for JavaScript here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
"Print to console": { | |
"prefix": "log", | |
"body": [ | |
"console.log('$1');", | |
"$2" | |
], | |
"description": "Log output to console" | |
} | |
*/ | |
/*ExtJS*/ | |
"Permission": { | |
"prefix": "ext.permission", | |
"body": [ | |
"if(!DesktopApp.security.hasPermission(sender.ruleTarget, sender.rule)){", | |
"\tDesktopApp.msg.alert('권한이 없습니다.');", | |
"\treturn;", | |
"}" | |
], | |
"description": "User Permission check" | |
}, | |
"TriggerIcons": { | |
"prefix": "ext.triggericons", | |
"body": [ | |
"x-form-clear-trigger // the X icon", | |
"x-form-search-trigger // the magnifying glass icon", | |
"x-form-trigger // the down arrow (default for combobox) icon", | |
"x-form-date-trigger // the calendar icon (just in case)" | |
], | |
"description": "Trigger Icons" | |
}, | |
"ExtAjax": { | |
"prefix": "ext.ajax", | |
"body": [ | |
"Ext.Ajax.request({", | |
"\turl: '${id:url}',", | |
"\tparams: '${id:data}',", | |
"\tmethod: 'POST',", | |
"\tsuccess: function (response) {", | |
"\t\tvar raw = Ext.decode(response.responseText);", | |
"\t\tconsole.log(raw.data);", | |
"\t},", | |
"\tfailure: function (response) {", | |
"\t\tconsole.log(response);", | |
"\t}", | |
"});" | |
], | |
"description": "Ext Ajax" | |
}, | |
"ExtWindow":{ | |
"prefix": "ext.window", | |
"body":[ | |
"Ext.create('Ext.window.Window', {", | |
" title:'',", | |
" width:800,", | |
" height:600,", | |
" constrain:true,", | |
" modal:true,", | |
" autoShow:true,", | |
" buttons:[{", | |
" text:'',", | |
" handler:function(){", | |
"", | |
" }", | |
" }]", | |
"});", | |
], | |
"description": "Ext Window" | |
} | |
/*Common*/ | |
"PerfomanceTest": { | |
"prefix": "test.perfomance", | |
"body": [ | |
"var t0 = performance.now();", | |
"var result = makeHash('Test');", | |
"var t1 = performance.now();", | |
"console.log('Took', (t1 - t0).toFixed(4), 'milliseconds to generate:', result);" | |
], | |
"description": "PerfomanceTest" | |
}, | |
/*jQuery*/ | |
"JqueryAjax": { | |
"prefix": "jq.ajax", | |
"body": [ | |
"$.ajax({", | |
"\turl:'${id:url}',", | |
"\ttype:'POST',", | |
"\tdata:'',", | |
"\tdataType:'json',", | |
"\theaders: { 'X-CSRF-TOKEN': $('meta[name=\"csrf-token\"]').attr('content')},", | |
"\tbeforeSend:function(){", | |
"\t\tloading.on();", | |
"\t},", | |
"\tsuccess:function(response){", | |
"\t\tif(response.success === true){", | |
"\t\t\t", | |
"\t\t}else{", | |
"\t\t\tswal({", | |
"\t\t\t\ttitle: response.message,", | |
"\t\t\t\ttimer:1500,", | |
"\t\t\t\tshowCloseButton: true,", | |
"\t\t\t\tallowEscapeKey: true,", | |
"\t\t\t\tallowOutsideClick: true,", | |
"\t\t\t\tshowConfirmButton:false,", | |
"\t\t\t\tanimation: false", | |
"\t\t\t});", | |
"\t\t", | |
"\t\t\tswal.show();", | |
"\t\t}", | |
"\t},", | |
"\terror:function(request, status, error){", | |
"\t\tconsole.error('code: ' + request.status + '\\nmessage: ' + request.responseText + '\\nerror: ' + error);", | |
"\t},", | |
"\tcomplete:function(){", | |
"\t\tloading.off();", | |
"\t}", | |
"});" | |
], | |
"description": "JqueryAjax" | |
}, | |
"JqueryDialog": { | |
"prefix": "jq.dialog", | |
"body": [ | |
"var div = document.createElement('div');", | |
"", | |
"$(div).dialog({", | |
"\ttitle:'${id:title}',", | |
"\twidth:$(window).width() > 1280 ? 1280 : $(window).width() * 0.95,", | |
"\tmodal:true,", | |
"\tcloseText:'닫기',", | |
"\tclose:function(){", | |
"\t\t$(this).remove();", | |
"\t},", | |
"\tbuttons:[{", | |
"\t\ttext:'닫기',", | |
"\t\tclick:function(){", | |
"\t\t\t$(this).dialog('close');", | |
"\t\t},", | |
"\t\tclass:'btn btn-sm btn-default'", | |
"\t},{", | |
"\t\ttext:'저장',", | |
"\t\tclick:function(){", | |
"\t\t\t$(this).dialog('close');", | |
"\t\t},", | |
"\t\tclass:'btn btn-sm btn-primary'", | |
"\t}]", | |
"});" | |
], | |
"description": "JqueryDialog" | |
}, | |
"JqueryDialogPositionAdjust": { | |
"prefix": "jq.dialog.position.autoset", | |
"body": [ | |
"//dialog position 보정", | |
"$(div).dialog({", | |
"\tposition: { my: 'center', at: 'center', of: window }", | |
"});" | |
], | |
"description": "JqueryDialogPositionAdjust" | |
}, | |
"TableColumnSet": { | |
"prefix": "jq.table.column.set", | |
"body": [ | |
"fnTableColumnSet('${id:#table_id}', {", | |
"\t'${id:column_index}': {", | |
"\t\t${id:type}: '${id:none|flex|fill}',", | |
"\t\t${id:width}: '${id:px|int|int}'", | |
"\t}", | |
"});" | |
], | |
"description": "TableColumnSet" | |
}, | |
"DataTableColumnFix": { | |
"prefix": "jq.table.column.fix", | |
"body": [ | |
"fnDataTableColumnFix('${id:#table_id}');" | |
], | |
"description": "TableColumnSet" | |
}, | |
"JqueryWorkerReceiver": { | |
"prefix": "jq.worker.receiver", | |
"body":[ | |
"if(!!window.Worker){", | |
" //브라우저가 웹 워커를 지원하는지 검사한다", | |
" CALLBACK.onmessage = function(response){ //워커로부터 전달되는 메시지를 받는다", | |
" console.log(response);", | |
" var result = JSON.parse(response.data);", | |
"", | |
" //dialog position 보정", | |
" $(div).dialog({", | |
" position: { my: 'center', at: 'center', of: window }", | |
" });", | |
"", | |
" //워커 초기화", | |
" CALLBACK = new Worker('/res/script/callback.js');", | |
" };", | |
"}" | |
], | |
"description": "Javascript Worker Receiver" | |
}, | |
"JqueryWorkerSender": { | |
"prefix": "jq.worker.sender", | |
"body": [ | |
"var result = {", | |
" result: true,", | |
" data: ${id:value|object}", | |
"}", | |
"", | |
"CALLBACK.postMessage(JSON.stringify(result));" | |
], | |
"description": "Javascript Worker Sender" | |
}, | |
"JavascriptFormData":{ | |
"prefix": "js.form.getData", | |
"body": [ | |
"var form = $('form');", | |
"", | |
"var formSerializeData = form.serializeArray();", | |
"var formData = {};", | |
"", | |
"for(var idx in formSerializeData){", | |
" formData[formSerializeData[idx].name] = formSerializeData[idx].value;", | |
"}" | |
], | |
"description": "Javascript Form Get Data" | |
}, | |
"DatatableRecord": { | |
"prefix": "datatables.getRecord", | |
"body":[ | |
"var record = $('#${tableId:}').DataTable().row(${rowIdx:}).data();" | |
], | |
"description": "Javascript Plugin DataTables Get Record" | |
}, | |
"SweetAlert2_Normal":{ | |
"prefix": "swal.normal", | |
"body":[ | |
"$.post('https://limonte.github.io/sweetalert2/', function(data){", | |
" swal({", | |
" showCloseButton: true,", | |
" allowEscapeKey: false,", | |
" allowOutsideClick: false,", | |
" showConfirmButton:false,", | |
" animation: false,", | |
" onOpen:function(sender){", | |
" $(sender).append(data);", | |
" }", | |
" });", | |
"}).then((result) => {", | |
" console.log(result);", | |
"});" | |
], | |
"description": "Javascript Plugin SweetAlert2 Normal Form" | |
}, | |
"SweetAlert2_loading":{ | |
"prefix": "swal.loading", | |
"body":[ | |
"swal({", | |
" showCloseButton: false,", | |
" allowEscapeKey: false,", | |
" allowOutsideClick: false,", | |
" showConfirmButton:false,", | |
" animation: false,", | |
" position:'center',", | |
" title:'<?php echo __('message.loadingText');?>',", | |
" onOpen:function(){", | |
" swal.showLoading();", | |
" }", | |
"});" | |
], | |
"description": "Javascript Plugin SweetAlert2 Loading Form" | |
}, | |
"FormData":{ | |
"prefix": "js.getFormData", | |
"body":[ | |
"var form = $('#post-edit-form');", | |
"var formData = $('form').serialize();", | |
"var formSerializeArray = $('form').serializeArray();", | |
"var rawData = {};", | |
" ", | |
"for(var item in formSerializeArray){ ", | |
" var name = formSerializeArray[item].name.replace('post[', '').replace(']', '');", | |
" rawData[name] = formSerializeArray[item].value;", | |
"}" | |
], | |
"description": "HTML Form Element Get Data" | |
}, | |
"Axios":{ | |
"prefix": "axios.post", | |
"body":[ | |
"axios.post('${id:url}', {", | |
" data: ${id:data}", | |
"})", | |
".then(function (response) {", | |
" console.log(response);", | |
"})", | |
".catch(function (error) {", | |
" console.log(error);", | |
"});" | |
] | |
}, | |
/* Vue.JS */ | |
"vueInitExport":{ | |
"prefix": "vue.export", | |
"body":[ | |
"export default {", | |
" components : {},", | |
" data() {", | |
" return {}", | |
" },", | |
" created() {", | |
" }," | |
" mounted() {", | |
" },", | |
" methods: {", | |
" }", | |
"}" | |
] | |
}, | |
"vueAxios":{ | |
"prefix": "vue.ajax", | |
"body":[ | |
"var me = this;", | |
"", | |
"try {", | |
" me.__showProgress();", | |
"", | |
" var params = {", | |
" }", | |
"", | |
" let response = await me.$$http.post('/${url}', params);", | |
"", | |
" if(response.data.success){", | |
" await me.$$swal({", | |
" html: '<h2>' + response.data.message + '</h2>',", | |
" type: 'success',", | |
" showConfirmButton: true,", | |
" confirmButtonText: me.__t('message.ok')", | |
" });", | |
"", | |
" me.$$root.$$emit('${event}');", | |
" me.$$modal.hide('${modal_id}');", | |
" }else{", | |
" await me.$$swal({", | |
" html: '<h2>' + response.data.message + '</h2>',", | |
" type: 'error',", | |
" showConfirmButton: true,", | |
" confirmButtonText: me.__t('message.ok')", | |
" });", | |
"", | |
" me.__showProgress(false);", | |
" }", | |
"}catch(e){", | |
" me.__showProgress(false);", | |
" console.log(e);", | |
"}", | |
] | |
} | |
} |
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
{ | |
// Place your snippets for json here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$1');", | |
// "$2" | |
// ], | |
// "description": "Log output to console" | |
// } | |
"Multi Language": { | |
"prefix": "language", | |
"body": [ | |
"{", | |
" \"alert\":{", | |
" ", | |
" },", | |
" \"auth\": {", | |
" ", | |
" },", | |
" \"pagination\": {", | |
" ", | |
" },", | |
" \"passwords\":{", | |
" ", | |
" },", | |
" \"validation\":{", | |
" ", | |
" },", | |
" \"message\":{", | |
" ", | |
" }", | |
"}", | |
], | |
"description": "다국어 관리 JSON" | |
} | |
} |
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
{ | |
/* | |
// Place your snippets for PHP here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
"Print to console": { | |
"prefix": "log", | |
"body": [ | |
"console.log('$1');", | |
"$2" | |
], | |
"description": "Log output to console" | |
} | |
*/ | |
"Laravel.Validate":{ | |
"prefix": "laravel.validate", | |
"body": [ | |
"$$request = request();", | |
"", | |
"$$validator = Validator::make($$request->all(), [", | |
" '${param}' => 'required'", | |
"]);", | |
"", | |
"$$param = $$request['param'];", | |
"", | |
"if($$validator->fails()) {", | |
" $$result = ['success'=> false, 'message' => trans($$validator->messages()->first())];", | |
"", | |
" return $$result;", | |
"}else{", | |
" ", | |
"}", | |
], | |
"description": "Laravel validate" | |
}, | |
"Laravel.Debug": { | |
"prefix": "laravel.debugging", | |
"body": [ | |
"Logger::debugging(${msg:'here problem'});" | |
], | |
"description": "Logging" | |
}, | |
"Laravel.Lang":{ | |
"prefix": "laravel.lang.message", | |
"body":[ | |
"echo __('message.${text}');" | |
], | |
"description": "Input Text for Multi Language" | |
}, | |
"Laravel.DbCreate":{ | |
"prefix": "laravel.create", | |
"body":[ | |
"try{", | |
" \\DB::beginTransaction();", | |
"", | |
" $$data = new Model();", | |
"", | |
" $$result = $$data->save();", | |
"", | |
" if(!$$result){", | |
" $$result = ['success'=>false, 'message'=>'Error occurred during result parse.'];", | |
" \\DB::rollback();", | |
" }else{", | |
" $$result = ['success'=>true, 'message'=>'Successfully processed.'];", | |
" \\DB::commit();", | |
" }", | |
"}catch (Throwable $$e) {", | |
" Logger::debugging(date('Y-m-d H:i:s').' - '.$$e->getFile().' '.$$e->getLine());", | |
" Logger::debugging(date('Y-m-d H:i:s').' - '.$$e->getMessage());", | |
" Logger::debugging(date('Y-m-d H:i:s').' - '.$$e->getTraceAsString());", | |
"", | |
" $$result = ['success'=>false, 'message'=>'An throwable occurred.'];", | |
" \\DB::rollback();", | |
" ", | |
" return response()->json($$result);", | |
"}", | |
"", | |
"return response()->json($$result);" | |
], | |
"description": "Response Type JSON" | |
}, | |
"Laravel.DbUpdate":{ | |
"prefix": "laravel.update", | |
"body":[ | |
"try{", | |
" DB::beginTransaction();", | |
"", | |
" $$id = strip_tags($request['id']);", | |
" $$data = Model::find(endecryption(2, $id));", | |
"", | |
" $$result = $$data->save();", | |
"", | |
" if(!is_null($$data)){", | |
" if(!$$result){", | |
" $$result = ['success'=>false, 'message'=>'Error occurred during result parse.'];", | |
" DB::rollback();", | |
" }else{", | |
" $$result = ['success'=>true, 'message'=>'Successfully processed.'];", | |
" DB::commit();", | |
" }", | |
" }else{", | |
" $$result = ['success'=>false, 'message'=>'The data does not exist.'];", | |
" DB::rollback();", | |
" }" | |
"}catch (Throwable $$e) {", | |
" $$result = ['success'=>false, 'message'=>'An throwable occurred.'];", | |
" DB::rollback();", | |
" ", | |
" return response()->json($$result);", | |
"}", | |
"", | |
"return response()->json($$result);" | |
], | |
"description": "Response Type JSON" | |
}, | |
"Laravel.select":{ | |
"prefix": "laravel.select", | |
"body":[ | |
"$$columns = [", | |
" 'created_at',", | |
" 'id',", | |
" 'symbol',", | |
" 'method',", | |
" 'source',", | |
" 'destination',", | |
" 'amount',", | |
" 'fee',", | |
" 'transaction_id',", | |
" 'block_explorer'", | |
"];", | |
"", | |
"if(isset($$request['coin']) && !empty($$request['coin']) && $$request['coin'] != 'all'){", | |
" $$coin = CoinModel::where('symbol', $$request['coin'])->first();", | |
"", | |
" if(!is_null($$coin)){", | |
" $$request['coin'] = $$coin->id;", | |
" }else{", | |
" return response()->json(['success'=>false, 'data'=>[]]);", | |
" }", | |
"}", | |
"", | |
"$$query = TransactionModel::where([", | |
" 'user_id' => Auth::id()", | |
"]);", | |
"", | |
"if(isset($$request['coin']) && !empty($$request['coin']) && $$request['coin'] != 'all'){", | |
" $$query->where('coin_id', '=', $$request['coin']);", | |
"}", | |
"", | |
"if(isset($$request['search']['value']) && !empty($$request['search']['value'])){", | |
" $$query->whereRaw('(source like \"%'.$$request['search']['value'].'%\" or destination like \"%'.$$request['search']['value'].'%\")');", | |
"}", | |
"", | |
"foreach($$request['order'] as $$order){", | |
" $$query->orderBy($$columns[$$order['column']], $$order['dir']);", | |
"}", | |
"", | |
"if(isset($$request['length']) && !empty($$request['length'])){", | |
" $$query->skip($$request['start'])->take($$request['length']);", | |
"}", | |
"", | |
"$$coinsTable = (new CoinModel)->getTable();", | |
"$$transactionTable = (new TransactionModel)->getTable();", | |
"", | |
"$$query->join($$coinsTable, function($$coins) use ($$coinsTable, $$transactionTable){", | |
" $$coins->on($$coinsTable.'.id', '=', $$transactionTable.'.coin_id');", | |
"});", | |
"", | |
"$$data = $$query->select($$transactionTable.'.created_at', $$transactionTable.'.method', $$transactionTable.'.source', $$transactionTable.'.destination', $$transactionTable.'.amount', $$transactionTable.'.fee', $$transactionTable.'.transaction_id', $$transactionTable.'.block_explorer', $$coinsTable.'.symbol')->get();", | |
"", | |
"return response()->json(['success'=>true, 'data'=>$$data]);", | |
], | |
"description": "Select for jQuery DataTable" | |
}, | |
} |
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
{"version":"7.27.0","status":2,"welcomeShown":true} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment