Skip to content

Instantly share code, notes, and snippets.

@martinandersen3d
Last active January 15, 2019 09:57
Show Gist options
  • Save martinandersen3d/3fc4542e07b533072680319d43a2f480 to your computer and use it in GitHub Desktop.
Save martinandersen3d/3fc4542e07b533072680319d43a2f480 to your computer and use it in GitHub Desktop.
laravel collection vs code snippet
// in project folder: "\.vscode\snippets\vue.json"
// Put snippets at .vscode/snippets/<languageId>.json
// For example, .vscode/snippets/javascript.json
// extension: project snippet: https://github.com/rebornix/vscode-project-snippet
{
"all": {
"prefix": "all()",
"body": [
".all($1)"
],
"description": "all() Laravel Collection"
},
"average": {
"prefix": "average(key)",
"body": [
".average(key$1)"
],
"description": "average(key) Laravel Collection"
},
"chunk": {
"prefix": "chunk(size)",
"body": [
".chunk(size$1)"
],
"description": "chunk(size) Laravel Collection"
},
"collapse": {
"prefix": "collapse()",
"body": [
".collapse($1)"
],
"description": "collapse() Laravel Collection"
},
"combine": {
"prefix": "combine(array)",
"body": [
".combine(array$1)"
],
"description": "combine(array) Laravel Collection"
},
"concat": {
"prefix": "concat(collectionOrArrayOrObject)",
"body": [
".concat(collectionOrArrayOrObject$1)"
],
"description": "concat(collectionOrArrayOrObject) Laravel Collection"
},
"contains": {
"prefix": "contains(key,value)",
"body": [
".contains(key,value$1)"
],
"description": "contains(key,value) Laravel Collection"
},
"count": {
"prefix": "count()",
"body": [
".count($1)"
],
"description": "count() Laravel Collection"
},
"crossJoin": {
"prefix": "crossJoin(...values)",
"body": [
".crossJoin(...values$1)"
],
"description": "crossJoin(...values) Laravel Collection"
},
"dd": {
"prefix": "dd()",
"body": [
".dd($1)"
],
"description": "dd() Laravel Collection"
},
"diff": {
"prefix": "diff(values)",
"body": [
".diff(values$1)"
],
"description": "diff(values) Laravel Collection"
},
"diffKeys": {
"prefix": "diffAssoc(values)",
"body": [
".diffAssoc(values$1)"
],
"description": "diffAssoc(values) Laravel Collection"
},
"dump": {
"prefix": "diffKeys(object)",
"body": [
".diffKeys(object$1)"
],
"description": "diffKeys(object) Laravel Collection"
},
"each": {
"prefix": "dump()",
"body": [
".dump($1)"
],
"description": "dump() Laravel Collection"
},
"every": {
"prefix": "each(fn)",
"body": [
".each(fn$1)"
],
"description": "each(fn) Laravel Collection"
},
"except": {
"prefix": "every(fn)",
"body": [
".every(fn$1)"
],
"description": "every(fn) Laravel Collection"
},
"filter": {
"prefix": "except(properties)",
"body": [
".except(properties$1)"
],
"description": "except(properties) Laravel Collection"
},
"first": {
"prefix": "first(fn)",
"body": [
".first(fn$1)"
],
"description": "first(fn) Laravel Collection"
},
"flatMap": {
"prefix": "flatMap(fn)",
"body": [
".flatMap(fn$1)"
],
"description": "flatMap(fn) Laravel Collection"
},
"flatten": {
"prefix": "flatten(depth)",
"body": [
".flatten(depth$1)"
],
"description": "flatten(depth) Laravel Collection"
},
"flip": {
"prefix": "flip()",
"body": [
".flip($1)"
],
"description": "flip() Laravel Collection"
},
"forget": {
"prefix": "forget(key)",
"body": [
".forget(key$1)"
],
"description": "forget(key) Laravel Collection"
},
"forPage": {
"prefix": "forPage(page,chunk)",
"body": [
".forPage(page,chunk$1)"
],
"description": "forPage(page,chunk) Laravel Collection"
},
"get": {
"prefix": "get(key,defaultValue",
"body": [
".get(key,defaultValue$1"
],
"description": "get(key,defaultValue Laravel Collection"
},
"groupBy": {
"prefix": "groupBy(key)",
"body": [
".groupBy(key$1)"
],
"description": "groupBy(key) Laravel Collection"
},
"has": {
"prefix": "has(key)",
"body": [
".has(key$1)"
],
"description": "has(key) Laravel Collection"
},
"implode": {
"prefix": "implode(key,glue)",
"body": [
".implode(key,glue$1)"
],
"description": "implode(key,glue) Laravel Collection"
},
"intersect": {
"prefix": "intersect(values)",
"body": [
".intersect(values$1)"
],
"description": "intersect(values) Laravel Collection"
},
"intersectByKeys": {
"prefix": "intersectByKeys(values)",
"body": [
".intersectByKeys(values$1)"
],
"description": "intersectByKeys(values) Laravel Collection"
},
"isEmpty": {
"prefix": "isEmpty()",
"body": [
".isEmpty($1)"
],
"description": "isEmpty() Laravel Collection"
},
"isNotEmpty": {
"prefix": "isNotEmpty()",
"body": [
".isNotEmpty($1)"
],
"description": "isNotEmpty() Laravel Collection"
},
"keyBy": {
"prefix": "keyBy(key)",
"body": [
".keyBy(key$1)"
],
"description": "keyBy(key) Laravel Collection"
},
"keys": {
"prefix": "keys()",
"body": [
".keys($1)"
],
"description": "keys() Laravel Collection"
},
"last": {
"prefix": "last(fn)",
"body": [
".last(fn$1)"
],
"description": "last(fn) Laravel Collection"
},
"macro": {
"prefix": "macro(name,fn)",
"body": [
".macro(name,fn$1)"
],
"description": "macro(name,fn) Laravel Collection"
},
"map": {
"prefix": "map(fn)",
"body": [
".map(fn$1)"
],
"description": "map(fn) Laravel Collection"
},
"mapInto": {
"prefix": "mapInto(ClassName)",
"body": [
".mapInto(ClassName$1)"
],
"description": "mapInto(ClassName) Laravel Collection"
},
"mapToGroups": {
"prefix": "mapToGroups(fn)",
"body": [
".mapToGroups(fn$1)"
],
"description": "mapToGroups(fn) Laravel Collection"
},
"mapWithKeys": {
"prefix": "mapWithKeys(fn)",
"body": [
".mapWithKeys(fn$1)"
],
"description": "mapWithKeys(fn) Laravel Collection"
},
"max": {
"prefix": "max(key)",
"body": [
".max(key$1)"
],
"description": "max(key) Laravel Collection"
},
"median": {
"prefix": "median(key)",
"body": [
".median(key$1)"
],
"description": "median(key) Laravel Collection"
},
"merge": {
"prefix": "merge(objectOrArray)",
"body": [
".merge(objectOrArray$1)"
],
"description": "merge(objectOrArray) Laravel Collection"
},
"min": {
"prefix": "min(key)",
"body": [
".min(key$1)"
],
"description": "min(key) Laravel Collection"
},
"mode": {
"prefix": "mode(key)",
"body": [
".mode(key$1)"
],
"description": "mode(key) Laravel Collection"
},
"nth": {
"prefix": "nth(n,offset)",
"body": [
".nth(n,offset$1)"
],
"description": "nth(n,offset) Laravel Collection"
},
"only": {
"prefix": "only(properties)",
"body": [
".only(properties$1)"
],
"description": "only(properties) Laravel Collection"
},
"partition": {
"prefix": "partition(fn)",
"body": [
".partition(fn$1)"
],
"description": "partition(fn) Laravel Collection"
},
"pipe": {
"prefix": "pipe(fn)",
"body": [
".pipe(fn$1)"
],
"description": "pipe(fn) Laravel Collection"
},
"pluck": {
"prefix": "pluck(value,key)",
"body": [
".pluck(value,key$1)"
],
"description": "pluck(value,key) Laravel Collection"
},
"pop": {
"prefix": "pop()",
"body": [
".pop($1)"
],
"description": "pop() Laravel Collection"
},
"prepend": {
"prefix": "prepend(value,key)",
"body": [
".prepend(value,key$1)"
],
"description": "prepend(value,key) Laravel Collection"
},
"pull": {
"prefix": "pull(key)",
"body": [
".pull(key$1)"
],
"description": "pull(key) Laravel Collection"
},
"push": {
"prefix": "push(item)",
"body": [
".push(item$1)"
],
"description": "push(item) Laravel Collection"
},
"put": {
"prefix": "put(key,value)",
"body": [
".put(key,value$1)"
],
"description": "put(key,value) Laravel Collection"
},
"random": {
"prefix": "random(length)",
"body": [
".random(length$1)"
],
"description": "random(length) Laravel Collection"
},
"reduce": {
"prefix": "reduce(fn,carry)",
"body": [
".reduce(fn,carry$1)"
],
"description": "reduce(fn,carry) Laravel Collection"
},
"reject": {
"prefix": "reject(fn)",
"body": [
".reject(fn$1)"
],
"description": "reject(fn) Laravel Collection"
},
"reverse": {
"prefix": "reverse()",
"body": [
".reverse($1)"
],
"description": "reverse() Laravel Collection"
},
"search": {
"prefix": "search(valueOrFunction,strict)",
"body": [
".search(valueOrFunction,strict$1)"
],
"description": "search(valueOrFunction,strict) Laravel Collection"
},
"shift": {
"prefix": "shift()",
"body": [
".shift($1)"
],
"description": "shift() Laravel Collection"
},
"shuffle": {
"prefix": "shuffle()",
"body": [
".shuffle($1)"
],
"description": "shuffle() Laravel Collection"
},
"slice": {
"prefix": "slice(remove,limit)",
"body": [
".slice(remove,limit$1)"
],
"description": "slice(remove,limit) Laravel Collection"
},
"sort": {
"prefix": "sort(fn)",
"body": [
".sort(fn$1)"
],
"description": "sort(fn) Laravel Collection"
},
"sortBy": {
"prefix": "sortBy(valueOrFunction)",
"body": [
".sortBy(valueOrFunction$1)"
],
"description": "sortBy(valueOrFunction) Laravel Collection"
},
"sortByDesc": {
"prefix": "sortByDesc(valueOrFunction)",
"body": [
".sortByDesc(valueOrFunction$1)"
],
"description": "sortByDesc(valueOrFunction) Laravel Collection"
},
"splice": {
"prefix": "splice(index,limit,replace)",
"body": [
".splice(index,limit,replace$1)"
],
"description": "splice(index,limit,replace) Laravel Collection"
},
"split": {
"prefix": "split(numberOfGroups)",
"body": [
".split(numberOfGroups$1)"
],
"description": "split(numberOfGroups) Laravel Collection"
},
"sum": {
"prefix": "sum(key)",
"body": [
".sum(key$1)"
],
"description": "sum(key) Laravel Collection"
},
"take": {
"prefix": "take(length)",
"body": [
".take(length$1)"
],
"description": "take(length) Laravel Collection"
},
"tap": {
"prefix": "tap(fn)",
"body": [
".tap(fn$1)"
],
"description": "tap(fn) Laravel Collection"
},
"times": {
"prefix": "times(n,fn)",
"body": [
".times(n,fn$1)"
],
"description": "times(n,fn) Laravel Collection"
},
"toArray": {
"prefix": "toArray()",
"body": [
".toArray($1)"
],
"description": "toArray() Laravel Collection"
},
"toJson": {
"prefix": "toJson()",
"body": [
".toJson($1)"
],
"description": "toJson() Laravel Collection"
},
"transform": {
"prefix": "transform(fn)",
"body": [
".transform(fn$1)"
],
"description": "transform(fn) Laravel Collection"
},
"union": {
"prefix": "union(object)",
"body": [
".union(object$1)"
],
"description": "union(object) Laravel Collection"
},
"unique": {
"prefix": "unique(key)",
"body": [
".unique(key$1)"
],
"description": "unique(key) Laravel Collection"
},
"unless": {
"prefix": "when(value,fn,defaultFn)",
"body": [
".when(value,fn,defaultFn$1)"
],
"description": "when(value,fn,defaultFn) Laravel Collection"
},
"unwrap": {
"prefix": "unwrap(value)",
"body": [
".unwrap(value$1)"
],
"description": "unwrap(value) Laravel Collection"
},
"values": {
"prefix": "values()",
"body": [
".values($1)"
],
"description": "values() Laravel Collection"
},
"when": {
"prefix": "when(value,fn,defaultFn)",
"body": [
".when(value,fn,defaultFn$1)"
],
"description": "when(value,fn,defaultFn) Laravel Collection"
},
"where": {
"prefix": "where(key,operator,value)",
"body": [
".where(key,operator,value$1)"
],
"description": "where(key,operator,value) Laravel Collection"
},
"whereIn": {
"prefix": "whereIn(key,values)",
"body": [
".whereIn(key,values$1)"
],
"description": "whereIn(key,values) Laravel Collection"
},
"whereNotIn": {
"prefix": "whereNotIn(key,values)",
"body": [
".whereNotIn(key,values$1)"
],
"description": "whereNotIn(key,values) Laravel Collection"
},
"wrap": {
"prefix": "wrap(value)",
"body": [
".wrap(value$1)"
],
"description": "wrap(value) Laravel Collection"
},
"zip": {
"prefix": "zip(array) collect",
"body": [
".zip(array$1)"
],
"description": "zip(array) Laravel Collection"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment