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
[](https://packagist.org/packages/awcodes/filament-quick-create)
Plugin for [Filament Admin Panel](https://filamentphp.com) that adds a dropdown menu to the header to quickly create new items from anywhere in your app.
Plugin for [Filament Panels](https://filamentphp.com) that adds a dropdown menu to the header to quickly create new items from anywhere in your app.
8
+
9
+
## Compatibility
10
+
11
+
| Package Version | Filament Version |
12
+
|-----------------|------------------|
13
+
| 2.x | 2.x |
14
+
| 3.x | 3.x |
15
+
| 4.x | 4.x |
16
+
17
+
## Upgrading from v2 to v3
18
+
19
+
If you are upgrading from version 2 to version 3, you will need to update the namespace anywhere you are using the plugin from `Awcodes\FilamentQuickCreate` to `Awcodes\QuickCreate`.
6
20
7
21
## Installation
8
22
@@ -12,17 +26,13 @@ Install the package via composer
12
26
composer require awcodes/filament-quick-create
13
27
```
14
28
15
-
In an effort to align with Filament's theming methodology you will need to use a custom theme to use this plugin.
29
+
> [!IMPORTANT]
30
+
> If you have not set up a custom theme and are using Filament Panels follow the instructions in the [Filament Docs](https://filamentphp.com/docs/4.x/styling/overview#creating-a-custom-theme) first.
16
31
17
-
> **Note**
18
-
> If you have not set up a custom theme and are using a Panel follow the instructions in the [Filament Docs](https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme) first. The following applies to both the Panels Package and the standalone Forms package.
32
+
After setting up a custom theme add the plugin's views to your theme css file.
19
33
20
-
Add the plugin's views to your `tailwind.config.js` file.
@@ -32,7 +42,7 @@ By default, Quick Create will use all resources that are registered with current
32
42
### Registering the plugin
33
43
34
44
```php
35
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
45
+
use Awcodes\QuickCreate\QuickCreatePlugin;
36
46
37
47
public function panel(Panel $panel): Panel
38
48
{
@@ -51,7 +61,7 @@ public function panel(Panel $panel): Panel
51
61
Excluding resources will filter them out of the registered resources to prevent them from displaying in the dropdown.
52
62
53
63
```php
54
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
64
+
use Awcodes\QuickCreate\QuickCreatePlugin;
55
65
56
66
public function panel(Panel $panel): Panel
57
67
{
@@ -70,7 +80,7 @@ public function panel(Panel $panel): Panel
70
80
Sometimes, it might be easier to only include some resources instead of filtering them out. For instance, you have 30 resources but only want to display 3 to 4 in the dropdown.
71
81
72
82
```php
73
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
83
+
use Awcodes\QuickCreate\QuickCreatePlugin;
74
84
75
85
public function panel(Panel $panel): Panel
76
86
{
@@ -89,7 +99,7 @@ public function panel(Panel $panel): Panel
89
99
By default, Quick Create will sort all the displayed options in descending order by Label. This can be disabled should you choose. In which case they will be displayed in the order they are registered with Filament.
90
100
91
101
```php
92
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
102
+
use Awcodes\QuickCreate\QuickCreatePlugin;
93
103
94
104
public function panel(Panel $panel): Panel
95
105
{
@@ -106,7 +116,7 @@ public function panel(Panel $panel): Panel
106
116
By default, Quick Create will sort all the displayed options by Label. This can be changed to resource navigation sort should you choose. In which case they will be displayed in the order they are displayed in the navigation.
107
117
108
118
```php
109
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
119
+
use Awcodes\QuickCreate\QuickCreatePlugin;
110
120
111
121
public function panel(Panel $panel): Panel
112
122
{
@@ -123,7 +133,7 @@ public function panel(Panel $panel): Panel
123
133
You can attach keyboard shortcuts to trigger the Quick Create dropdown. To configure these, pass the keyBindings() method to the configuration:
124
134
125
135
```php
126
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
136
+
use Awcodes\QuickCreate\QuickCreatePlugin;
127
137
128
138
public function panel(Panel $panel): Panel
129
139
{
@@ -140,7 +150,7 @@ public function panel(Panel $panel): Panel
140
150
By default, the ability to create another record will respect the settings of your 'create record' or 'list records' create action. This can be overridden to either enable or disable it for all resources with the `createAnother()` method.
141
151
142
152
```php
143
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
153
+
use Awcodes\QuickCreate\QuickCreatePlugin;
144
154
145
155
public function panel(Panel $panel): Panel
146
156
{
@@ -159,7 +169,7 @@ public function panel(Panel $panel): Panel
159
169
By default, the Quick Create button will be fully rounded if you would like to have a more square button you can disable the rounding with the `rounded()` method.
160
170
161
171
```php
162
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
172
+
use Awcodes\QuickCreate\QuickCreatePlugin;
163
173
164
174
public function panel(Panel $panel): Panel
165
175
{
@@ -176,7 +186,7 @@ public function panel(Panel $panel): Panel
176
186
If you prefer to not show icons for the items in the menu you can disable them with the `hiddenIcons()` method.
177
187
178
188
```php
179
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
189
+
use Awcodes\QuickCreate\QuickCreatePlugin;
180
190
181
191
public function panel(Panel $panel): Panel
182
192
{
@@ -193,7 +203,7 @@ public function panel(Panel $panel): Panel
193
203
If you prefer to show a label with the plus icon you can set it using the `label()` method and passing your label to it.
194
204
195
205
```php
196
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
206
+
use Awcodes\QuickCreate\QuickCreatePlugin;
197
207
198
208
public function panel(Panel $panel): Panel
199
209
{
@@ -210,7 +220,7 @@ public function panel(Panel $panel): Panel
210
220
By default, Quick Create will render simple resources in a standard modal. If you would like to render them in a slide over instead you may use the `slideOver()` modifier to do so.
211
221
212
222
```php
213
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
223
+
use Awcodes\QuickCreate\QuickCreatePlugin;
214
224
215
225
public function panel(Panel $panel): Panel
216
226
{
@@ -227,7 +237,7 @@ public function panel(Panel $panel): Panel
227
237
By default, Quick Create is visible if there are registered resources. If you would like to hide it you may use the `hidden()` modifier to do so.
228
238
229
239
```php
230
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
240
+
use Awcodes\QuickCreate\QuickCreatePlugin;
231
241
232
242
public function panel(Panel $panel): Panel
233
243
{
@@ -244,7 +254,7 @@ public function panel(Panel $panel): Panel
244
254
By default, Quick Create plugin renders using `'panels::user-menu.before'` Filament Panel Render Hook. If you would like to customize this to render at a different render hook, you may use the `renderUsingHook(string $panelHook)` modifier to do so. You may read about the available Render Hooks in Filament PHP [here](https://filamentphp.com/docs/3.x/support/render-hooks#available-render-hooks)
245
255
246
256
```php
247
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
257
+
use Awcodes\QuickCreate\QuickCreatePlugin;
248
258
use Filament\View\PanelsRenderHook;
249
259
250
260
public function panel(Panel $panel): Panel
@@ -262,7 +272,7 @@ public function panel(Panel $panel): Panel
262
272
Quick create will automatically determine if it should redirect to a create page or to show the form in a modal based on the resource. If you prefer to force all items to be show in a modal you can do so with the `alwaysShowModal()` modifier.
263
273
264
274
```php
265
-
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
275
+
use Awcodes\QuickCreate\QuickCreatePlugin;
266
276
267
277
public function panel(Panel $panel): Panel
268
278
{
@@ -273,3 +283,20 @@ public function panel(Panel $panel): Panel
273
283
])
274
284
}
275
285
```
286
+
287
+
## Contributing
288
+
289
+
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
290
+
291
+
## Security Vulnerabilities
292
+
293
+
Please review [our security policy](.github/SECURITY.md) on how to report security vulnerabilities.
294
+
295
+
## Credits
296
+
297
+
-[Adam Weston](https://github.com/awcodes)
298
+
-[All Contributors](../../contributors)
299
+
300
+
## License
301
+
302
+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
0 commit comments