Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Quick Create Laravel Package

awcodes/filament-quick-create

Adds a Quick Create dropdown to Filament Panels so users can create new records from anywhere. Automatically lists authorized resources in the current panel, with options to include or exclude specific resources. Compatible with Filament v2–v5.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Pros:

    • Seamless Filament Integration: Designed specifically for Filament Panels (v2–v5), leveraging Filament’s plugin system, resource registration, and authorization. Aligns with Filament’s modular architecture, reducing friction for adoption.
    • Minimal Overhead: Adds a lightweight UI component (dropdown menu) without requiring changes to existing resource logic. Operates at the presentation layer, preserving business logic in resources.
    • Customizable: Supports granular configuration (e.g., includes/excludes, sorting, UI tweaks) via fluent methods, enabling alignment with product-specific workflows.
    • Event-Driven: Uses Filament’s render hooks (e.g., panels::user-menu.before) for placement, ensuring compatibility with Filament’s lifecycle.
  • Cons:

    • Tight Coupling to Filament: Not reusable outside Filament ecosystems (e.g., Livewire-only apps). Requires Filament’s resource system for functionality.
    • UI-Only Scope: Limited to creation workflows; does not handle CRUD beyond the initial "create" action (e.g., no bulk operations or advanced validation).
    • Dependency on Filament Versioning: Must align with Filament’s major versions (e.g., v5.x for Filament 5.x). Downgrading Filament may break compatibility.

Integration Feasibility

  • Low Risk for Filament Users:
    • Plugin-Based: Installs via Composer and registers via Panel::plugins(), requiring minimal boilerplate.
    • Automatic Resource Detection: Defaults to all registered resources, reducing manual setup. Explicit includes/excludes can override this.
    • Theme Compatibility: Requires a custom Filament theme (for CSS/Blade integration), but this is a Filament best practice for most projects.
  • Potential Challenges:
    • Resource-Specific Customization: If resources have unique create workflows (e.g., multi-step forms), the plugin’s modal/slide-over behavior may need overrides.
    • Authorization Edge Cases: Filament’s built-in auth may not cover all scenarios (e.g., tenant-specific permissions). The plugin respects Filament’s auth, but edge cases may require custom logic.

Technical Risk

  • Critical Risks:
    • Filament Version Mismatch: Using an incompatible Filament version (e.g., plugin v5.x with Filament v4.x) will cause runtime errors. Mitigate by pinning versions in composer.json.
    • CSS/Blade Conflicts: Custom themes or Filament plugins may override the plugin’s styles. Test in staging before production.
  • Moderate Risks:
    • Performance: Large numbers of resources (>50) may impact dropdown rendering. Monitor load times and consider includes() to limit options.
    • Keyboard Shortcuts: Conflicts with existing app shortcuts (e.g., command+shift+a). Test thoroughly with power users.
  • Low Risks:
    • Maintenance: MIT-licensed with active updates (releases every 1–3 months). Low risk of abandonment.
    • Security: No direct data access; inherits Filament’s auth system.

Key Questions for TPM

  1. Workflow Alignment:
    • Does the team frequently use "quick create" patterns? If not, the ROI may be low.
    • Are there existing shortcuts (e.g., bookmarklets, custom buttons) that could conflict with the plugin’s keyboard bindings?
  2. Resource Complexity:
    • Do any resources require custom create workflows (e.g., conditional fields, external API calls) that the plugin’s modal/slide-over might not support?
  3. Scalability:
    • How many resources will be exposed? If >30, consider performance implications or using includes().
  4. UI Consistency:
    • Does the team have a design system for Filament plugins? The plugin’s UI (e.g., icons, labels) may need alignment.
  5. Testing:
    • Are there Filament-specific tests (e.g., for plugins) in the CI pipeline? If not, add tests for the plugin’s dropdown functionality.
  6. Fallbacks:
    • Should the plugin gracefully degrade if Filament’s resource registration fails (e.g., during a partial outage)?

Integration Approach

Stack Fit

  • Primary Fit:
    • Filament Panels (v2–v5): Core dependency. The plugin is a first-class citizen in Filament’s ecosystem.
    • Laravel/Eloquent: Resources must extend Filament’s Resource class, which relies on Laravel’s ORM.
    • Livewire: Under the hood, Filament uses Livewire for reactivity. The plugin integrates with Livewire components (e.g., modals).
  • Secondary Fit:
    • Custom Themes: Requires a Filament custom theme for CSS/Blade integration. Projects using Filament’s default theme will need to set one up.
    • Tailwind CSS: The plugin uses Tailwind for styling. Ensure the project’s Tailwind config supports Filament’s classes.
  • Non-Fit:
    • Non-Filament Apps: Cannot be used in Laravel apps without Filament.
    • API-Only Backends: No UI layer to render the dropdown.

Migration Path

  1. Preparation:

    • Version Alignment: Ensure Filament and Laravel versions are compatible with the plugin (e.g., plugin v5.x for Filament 5.x).
    • Theme Setup: Configure a custom Filament theme if not already present. Add the plugin’s Blade views to resources/views/vendor/filament/panels/theme.css:
      @source '../../../../vendor/awcodes/filament-quick-create/resources/**/*.blade.php';
      
    • Backup: Save existing Panel configuration to avoid merge conflicts.
  2. Installation:

    • Composer:
      composer require awcodes/filament-quick-create
      
    • Register the plugin in app/Providers/FilamentPanelProvider.php:
      public function panel(Panel $panel): Panel {
          return $panel->plugins([
              QuickCreatePlugin::make()
                  ->includes([App\Filament\Resources\PostResource::class])
                  ->keyBindings(['command+shift+n']),
          ]);
      }
      
  3. Configuration:

    • Pilot Phase: Start with a subset of resources (e.g., includes()) to test behavior.
    • Customization: Adjust sorting, UI (e.g., hiddenIcons()), or hooks (e.g., renderUsingHook()) based on feedback.
    • Keyboard Shortcuts: Test bindings in a staging environment to avoid conflicts.
  4. Validation:

    • Functional Testing: Verify:
      • Dropdown appears for authorized resources.
      • Create actions work as expected (modal/redirect).
      • Permissions are respected (e.g., excluded resources don’t appear).
    • Performance: Load test with the maximum expected number of resources.
    • Accessibility: Ensure dropdown is keyboard-navigable and screen-reader-friendly.
  5. Rollout:

    • Phased Release: Deploy to a subset of users first (e.g., power users).
    • Monitoring: Track usage metrics (e.g., clicks on the dropdown) and errors (e.g., failed resource creation).

Compatibility

  • Filament Versions: Explicitly tested with Filament v2–v5. Use the table in the README to match versions.
  • Resource Types: Works with all Filament resources (e.g., Resource, Page). Custom resource classes may need adjustments.
  • Authentication: Inherits Filament’s auth (e.g., canCreate()). Additional logic may be needed for custom permission systems.
  • Localization: Supports translations (e.g., ckb for Kurdish). Extend with custom language files if needed.

Sequencing

  1. Low-Risk First:
    • Start with includes() to limit scope.
    • Use default settings (no custom hooks or bindings).
  2. Progressive Enhancement:
    • Add keyboard shortcuts after confirming no conflicts.
    • Customize UI (e.g., label(), rounded()) based on design feedback.
  3. Advanced Use Cases:
    • Implement custom render hooks (e.g., SIDEBAR_NAV_END) only if default placement is insufficient.
    • Override modal behavior (e.g., alwaysShowModal()) for specific resources.

Operational Impact

Maintenance

  • Proactive Tasks:
    • Version Updates: Monitor Filament and plugin releases. Test upgrades in staging (e.g., plugin v5.x for Filament 5.x).
    • Dependency Management: Use composer why-not to check for outdated dependencies.
    • Theme Updates: If the custom theme is updated, ensure the plugin’s Blade views are re-linked.
  • Reactive Tasks:
    • Plugin Bugs: Report issues to the maintainer or fork if critical (MIT license permits this).
    • Filament Breaking Changes: Stay updated on Filament’s changelog (e.g., render hook deprecations).

Support

  • User Training:
    • Document the new shortcut (e.g., command+shift+a) in the admin guide.
    • Highlight the dropdown’s location (e.g., "next to
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky