• Stars
    star
    165
  • Rank 228,906 (Top 5 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 2 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Plugin for Filament Panels that adds a dropdown menu to the header to quickly create new items.

Quick Create for Filament

Plugin for Filament Admin Panel that adds a dropdown menu to the header to quickly create new items from anywhere in your app.

quick-create-og

Installation

Install the package via composer

composer require awcodes/filament-quick-create

In an effort to align with Filament's theming methodology you will need to use a custom theme to use this plugin.

Note
If you have not set up a custom theme and are using a Panel follow the instructions in the Filament Docs first. The following applies to both the Panels Package and the standalone Forms package.

Add the plugin's views to your tailwind.config.js file.

content: [
    '<path-to-vendor>/awcodes/filament-quick-create/resources/**/*.blade.php',
]

Usage

By 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.

Registering the plugin

use Awcodes\FilamentQuickCreate\QuickCreatePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            QuickCreatePlugin::make(),
        ])
}

Warning
Excludes and includes are not meant to work together. You should use one or the other, but not both.

Excluding Resources

Excluding resources will filter them out of the registered resources to prevent them from displaying in the dropdown.

use Awcodes\FilamentQuickCreate\QuickCreatePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            QuickCreatePlugin::make()
                ->excludes([
                    \App\Filament\Resources\UserResource::class,
                ]),
        ])
}

Including Resources

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.

use Awcodes\FilamentQuickCreate\QuickCreatePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            QuickCreatePlugin::make()
                ->includes([
                    \App\Filament\Resources\UserResource::class,
                ]),
        ])
}

Sorting

By default, Quick Create will sort all the displayed options in descending order. This can be disabled should you choose. In which case they will be displayed in the order they are registered with Filament.

use Awcodes\FilamentQuickCreate\QuickCreatePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            QuickCreatePlugin::make()
                ->sort(false),
        ])
}

Slide Overs

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.

use Awcodes\FilamentQuickCreate\QuickCreatePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            QuickCreatePlugin::make()
                ->slideOver(),
        ])
}

More Repositories

1

filament-curator

A media picker plugin for Filament Panels.
PHP
321
star
2

filament-tiptap-editor

A Rich Text Editor plugin for Filament Forms.
PHP
275
star
3

filament-table-repeater

A modified version of the Filament Forms Repeater to display it as a table.
PHP
199
star
4

overlook

An app overview widget for Filament panels.
PHP
158
star
5

filament-badgeable-column

A custom table column that supports prefixed and suffixed badges to the column content.
PHP
118
star
6

drop-in-action

A form component for Filamentphp allowing actions inside of forms.
PHP
86
star
7

alpine-floating-ui

Add Floating UI functionality to Alpine 3.x components.
JavaScript
79
star
8

filament-sticky-header

A Filament Panels plugin to make headers sticky when scrolling.
PHP
60
star
9

shout

A simple inline contextual notice for Filament forms, basically just a fancy placeholder.
PHP
50
star
10

scribble

PHP
43
star
11

filament-versions

A mostly useless package to display framework versions on Filament panels.
PHP
40
star
12

filament-addons

A set of components / fields to extend Filament Admin.
PHP
30
star
13

light-switch

Plugin to add theme switching (light/dark/system) to the auth pages for Filament Panels.
PHP
29
star
14

filament-extras

PHP
28
star
15

filament-gravatar

Replace Filament's default avatar url provider with one for Gravatar.
PHP
26
star
16

recently

Easily track and access recently viewed records in your filament panels.
PHP
22
star
17

repro

CLI tool for quickly recreating reproduction repos locally.
PHP
18
star
18

preset-color-picker

A color picker field for Filament Forms that uses preset color palettes.
PHP
17
star
19

Matinee

OEmbed field for Filament Panel and Form Builders.
PHP
17
star
20

filament-installer

Filament Admin Panel application installer.
PHP
16
star
21

html-faker

A better html faker.
PHP
13
star
22

trov

A Laravel / Filament starter kit for CMS functionality on websites.
PHP
11
star
23

hydro

CLI for creating new Filament plugins
PHP
9
star
24

filament-plugin-purge

A purge tool to keep your Filament plugin from bloating / duplicating Filament's default styles.
CSS
9
star
25

palette

A color picker field for Filament Forms that uses preset color palettes.
PHP
8
star
26

pounce

A global modal/dialog plugin for Filament.
PHP
7
star
27

filament-sentry

A basic auth scaffolding for Filament utilizing Filament Breezy, Filament Shield and custom User Resources.
PHP
7
star
28

filament-oembed

PHP
6
star
29

sink

A collection of components for Filament.
PHP
6
star
30

curator

PHP
4
star
31

translation-field

A form component for Filament to handle translations at the field / input level.
PHP
3
star
32

postal-codes

This is a package to easily install and use postal codes in your Laravel application from GeoNames.org
PHP
3
star
33

tiptap-demo

Project for testing tiptap functionality
PHP
3
star
34

assistant

A collection of helpers for use in Laravel projects.
PHP
2
star
35

dimmer

Blade
2
star
36

trov-components

A set of components, fields and layouts to extend Filament Admin.
PHP
2
star
37

awcodes-astro

Astro
2
star
38

filament-skins

PHP
2
star
39

gtm

Easy integration of Google Tag Manager into your Laravel application.
PHP
2
star
40

trov-installer

PHP
1
star
41

colors-experiment

PHP
1
star
42

pluginshot

AWcodes Plugin Screenshot Generator
PHP
1
star
43

headings

A Custom Form Component to demo building a standalone Forms Builder plugin for Filament
PHP
1
star
44

laravel-remix

Revert a new Laravel application to Laravel Mix.
PHP
1
star
45

trov-filament

PHP
1
star