mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-07-09 17:04:27 +02:00
update
This commit is contained in:
parent
e53a643e3d
commit
1ab37bd478
209 changed files with 79957 additions and 0 deletions
33
my-snippets/laravel5/snippets/eloquent.json
Normal file
33
my-snippets/laravel5/snippets/eloquent.json
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"eloquent-getter": {
|
||||
"prefix": "Eloquent-getter",
|
||||
"body": [
|
||||
"public function get${1:Name}Attribute(\\$value) {",
|
||||
" return ${2:strtoupper(\\$value)};",
|
||||
"}"
|
||||
],
|
||||
"description": "Eloquent getter (Laravel 5.1+)"
|
||||
},
|
||||
"eloquent-setter": {
|
||||
"prefix": "Eloquent-setter",
|
||||
"body": [
|
||||
"public function set${1:Name}Attribute(\\$value) {",
|
||||
" \\$this->attributes['${2:column}'] = ${3:\\$value};",
|
||||
"}"
|
||||
],
|
||||
"description": "Eloquent setter (Laravel 5.1+)"
|
||||
},
|
||||
"eloquent-attribute": {
|
||||
"prefix": "Eloquent-attribute",
|
||||
"body": [
|
||||
"public function ${1:name}(): Attribute",
|
||||
"{",
|
||||
" return new Attribute(",
|
||||
" get: fn (\\$value) => ${2:strtoupper(\\$value)},",
|
||||
" set: fn (\\$value) => ${3:\\$value},",
|
||||
" );",
|
||||
"}"
|
||||
],
|
||||
"description": "Eloquent accessors / mutators (Laravel 9.x)"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue