{"id":13733116,"url":"https://github.com/awcodes/filament-quick-create","last_synced_at":"2026-02-27T22:29:05.435Z","repository":{"id":45658516,"uuid":"511175628","full_name":"awcodes/filament-quick-create","owner":"awcodes","description":"Plugin for Filament Panels that adds a dropdown menu to the header to quickly create new items.","archived":false,"fork":false,"pushed_at":"2024-03-25T12:46:57.000Z","size":374,"stargazers_count":136,"open_issues_count":0,"forks_count":20,"subscribers_count":3,"default_branch":"3.x","last_synced_at":"2024-03-25T14:35:17.070Z","etag":null,"topics":["filament","filament-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awcodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"awcodes"}},"created_at":"2022-07-06T14:41:28.000Z","updated_at":"2024-04-15T06:05:18.599Z","dependencies_parsed_at":"2024-04-15T06:05:04.527Z","dependency_job_id":"0f8543c6-b6c0-4853-97a0-7a137852cbf1","html_url":"https://github.com/awcodes/filament-quick-create","commit_stats":{"total_commits":36,"total_committers":9,"mean_commits":4.0,"dds":0.2777777777777778,"last_synced_commit":"b29d1b3894729c34a23c7244084da11ac2d68663"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awcodes%2Ffilament-quick-create","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awcodes%2Ffilament-quick-create/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awcodes%2Ffilament-quick-create/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awcodes%2Ffilament-quick-create/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awcodes","download_url":"https://codeload.github.com/awcodes/filament-quick-create/tar.gz/refs/heads/3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256112,"owners_count":20909240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filament","filament-plugin"],"created_at":"2024-08-03T03:00:37.842Z","updated_at":"2026-02-27T22:29:05.395Z","avatar_url":"https://github.com/awcodes.png","language":"PHP","readme":"# Quick Create for Filament\n\nPlugin 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.\n\n![quick-create-og](https://res.cloudinary.com/aw-codes/image/upload/w_1200,f_auto,q_auto/plugins/quick-create/awcodes-quick-create.jpg)\n\n## Installation\n\nInstall the package via composer\n\n```bash\ncomposer require awcodes/filament-quick-create\n```\n\nIn an effort to align with Filament's theming methodology you will need to use a custom theme to use this plugin.\n\n\u003e **Note**\n\u003e 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.\n\nAdd the plugin's views to your `tailwind.config.js` file.\n\n```js\ncontent: [\n    '\u003cpath-to-vendor\u003e/awcodes/filament-quick-create/resources/**/*.blade.php',\n]\n```\n\n## Usage\n\nBy default, Quick Create will use all resources that are registered with current Filament context. All resources will follow the authorization used by Filament, meaning that if a user doesn't have permission to create a record it will not be listed in the dropdown.\n\n### Registering the plugin\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make(),\n        ])\n}\n```\n\n\u003e **Warning**\n\u003e Excludes and includes are not meant to work together. You should use one or the other, but not both.\n\n### Excluding Resources\n\nExcluding resources will filter them out of the registered resources to prevent them from displaying in the dropdown.\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003eexcludes([\n                    \\App\\Filament\\Resources\\UserResource::class,\n                ]),\n        ])\n}\n```\n\n### Including Resources\n\nSometimes, 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.\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003eincludes([\n                    \\App\\Filament\\Resources\\UserResource::class,\n                ]),\n        ])\n}\n```\n\n### Sorting\n\nBy 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.\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003esort(false),\n        ])\n}\n```\n\n### Sorting by resource navigation\n\nBy 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.\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003esortBy('navigation'),\n        ])\n}\n```\n\n### Registering keybindings\n\nYou can attach keyboard shortcuts to trigger the Quick Create dropdown. To configure these, pass the keyBindings() method to the configuration:\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003ekeyBindings(['command+shift+a', 'ctrl+shift+a']),\n        ])\n}\n```\n\n### Create Another\n\nBy 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.\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003ecreateAnother(false),\n        ])\n}\n```\n\n### Appearance\n\n#### Rounded\n\nBy 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.\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003erounded(false),\n        ])\n}\n```\n\n#### Hiding Icons\n\nIf you prefer to not show icons for the items in the menu you can disable them with the `hiddenIcons()` method.\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003ehiddenIcons(),\n        ])\n}\n```\n\n#### Setting a label\n\nIf you prefer to show a label with the plus icon you can set it using the `label()` method and passing your label to it.\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003elabel('New'),\n        ])\n}\n```\n\n### Slide Overs\n\nBy 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.\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003eslideOver(),\n        ])\n}\n```\n\n### Hiding Quick Create\n\nBy 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.\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003ehidden(fn() =\u003e Filament::getTenant()-\u003erequiresOnboarding()),\n        ])\n}\n```\n\n### Render Plugin on a Custom Panel Hook\n\nBy 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)\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\nuse Filament\\View\\PanelsRenderHook;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003erenderUsingHook(PanelsRenderHook::SIDEBAR_NAV_END),\n        ])\n}\n```\n\n### Forcing all resources to use modals\n\nQuick 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.\n\n```php\nuse Awcodes\\FilamentQuickCreate\\QuickCreatePlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugins([\n            QuickCreatePlugin::make()\n                -\u003ealwaysShowModal(),\n        ])\n}\n```\n","funding_links":["https://github.com/sponsors/awcodes"],"categories":["UI"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawcodes%2Ffilament-quick-create","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawcodes%2Ffilament-quick-create","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawcodes%2Ffilament-quick-create/lists"}