Skip to content

Commit 10345cd

Browse files
authored
Add Laravel Idea support (#44)
Add support for creating enums via Laravel Idea.
1 parent 2a22f14 commit 10345cd

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

ide.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"$schema": "https://laravel-ide.com/schema/laravel-ide-v2.json",
3+
"codeGenerations": [
4+
{
5+
"id": "webfox.create-string-backed-enum",
6+
"name": "Create String Backed Enum",
7+
"classSuffix": "Enum",
8+
"files": [
9+
{
10+
"appNamespace": "Enums",
11+
"name": "${INPUT_CLASS|className|upperCamelCase}.php",
12+
"template": {
13+
"type": "stub",
14+
"path": "/stubs/laravel-backed-enum.stub",
15+
"fallbackPath": "stubs/laravel-backed-enum.stub",
16+
"parameters": {
17+
"{{ class }}": "${INPUT_CLASS|className|upperCamelCase}",
18+
"{{ namespace }}": "${INPUT_FQN|namespace}",
19+
"{{ value }}": "'standard'",
20+
"{{ type }}": "string"
21+
}
22+
}
23+
}
24+
]
25+
},
26+
{
27+
"id": "webfox.create-int-backed-enum",
28+
"name": "Create Integer Backed Enum",
29+
"classSuffix": "Enum",
30+
"files": [
31+
{
32+
"appNamespace": "Enums",
33+
"name": "${INPUT_CLASS|className|upperCamelCase}.php",
34+
"template": {
35+
"type": "stub",
36+
"path": "/stubs/laravel-backed-enum.stub",
37+
"fallbackPath": "stubs/laravel-backed-enum.stub",
38+
"parameters": {
39+
"{{ class }}": "${INPUT_CLASS|className|upperCamelCase}",
40+
"{{ namespace }}": "${INPUT_FQN|namespace}",
41+
"{{ value }}": "0",
42+
"{{ type }}": "int"
43+
}
44+
}
45+
}
46+
]
47+
}
48+
]
49+
}

0 commit comments

Comments
 (0)