You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Package Name (Default: Blog Package): Your Package
42
+
- Package Description (Default: This is my package Blog Package)
43
+
- Package Entity (Default: Item): e.g. Post
44
+
- Tablename (Default: items): e.g. posts
45
+
46
+
After building the package, you can push the changes to GitHub and create an installable package on Packagist.org. Don't forget to adjust the README to your composer namespace.
47
+
48
+
### Config
49
+
50
+
After that the Resource is highly configurable.
51
+
52
+
#### Tabs and Translation
53
+
54
+
Moox Core features like Dynamic Tabs and Translatable Config. See the config file for more details, but as a quick example:
| Define the tabs for the Resource table. They are optional, but
63
+
| pretty awesome to filter the table by certain values.
64
+
| You may simply do a 'tabs' => [], to disable them.
65
+
|
66
+
*/
67
+
68
+
'tabs' => [
69
+
'all' => [
70
+
'label' => 'trans//core::core.all',
71
+
'icon' => 'gmdi-filter-list',
72
+
'query' => [
73
+
[
74
+
'field' => 'deleted_at',
75
+
'operator' => '=',
76
+
'value' => null,
77
+
],
78
+
],
79
+
],
80
+
'published' => [
81
+
'label' => 'trans//core::core.published',
82
+
'icon' => 'gmdi-check-circle',
83
+
'query' => [
84
+
[
85
+
'field' => 'publish_at',
86
+
'operator' => '<=',
87
+
'value' => function () {
88
+
return now();
89
+
},
90
+
],
91
+
[
92
+
'field' => 'deleted_at',
93
+
'operator' => '=',
94
+
'value' => null,
95
+
],
96
+
],
97
+
],
98
+
'scheduled' => [
99
+
'label' => 'trans//core::core.scheduled',
100
+
'icon' => 'gmdi-schedule',
101
+
'query' => [
102
+
[
103
+
'field' => 'publish_at',
104
+
'operator' => '>',
105
+
'value' => function () {
106
+
return now();
107
+
},
108
+
],
109
+
[
110
+
'field' => 'deleted_at',
111
+
'operator' => '=',
112
+
'value' => null,
113
+
],
114
+
],
115
+
],
116
+
'draft' => [
117
+
'label' => 'trans//core::core.draft',
118
+
'icon' => 'gmdi-text-snippet',
119
+
'query' => [
120
+
[
121
+
'field' => 'publish_at',
122
+
'operator' => '=',
123
+
'value' => null,
124
+
],
125
+
[
126
+
'field' => 'deleted_at',
127
+
'operator' => '=',
128
+
'value' => null,
129
+
],
130
+
],
131
+
],
132
+
'deleted' => [
133
+
'label' => 'trans//core::core.deleted',
134
+
'icon' => 'gmdi-delete',
135
+
'query' => [
136
+
[
137
+
'field' => 'deleted_at',
138
+
'operator' => '!=',
139
+
'value' => null,
140
+
],
141
+
],
142
+
],
143
+
],
144
+
],
145
+
```
146
+
147
+
All options for Tabs are explained in [Moox Core docs](https://github.com/mooxphp/core/blob/main/README.md#dynamic-tabs).
148
+
149
+
#### Item Types
150
+
151
+
The item also support 'item' types, means you are able to configure selectable types for your Entity. By default, we provide "Post" and "Page" as example. If you don't want to use types, just empty the array and the field and column become invisible.
Copy file name to clipboardExpand all lines: packages/core/README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -544,6 +544,10 @@ You can enable shared hosting features. This is useful if you want to run schedu
544
544
],
545
545
```
546
546
547
+
## Assets
548
+
549
+
Moox Core provides a couple of (non-publishable) assets, loaded by a dynamic route. All images and assets in /public can be used like `url('/moox/core/assets/noimage.svg'`.
550
+
547
551
## Changelog
548
552
549
553
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
0 commit comments