oriondevelops / filament-feedback
A Filament plugin to collect feedback.
Fund package maintenance!
oriondevelops
Requires
- php: ^8.1
- filament/filament: ^3.0
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
README
This Filament plugin is a simple wizard that collects user feedback and forwards it to the chosen email address.
Installation
You can install the package via composer:
composer require oriondevelops/filament-feedback
Next ensure you setup a mail service.
Usage
You need to register the plugin with your preferred Filament panel providers. This can be done inside of your PanelProvider
, e.g. AdminPanelProvider
.
<?php namespace App\Providers\Filament; use Filament\Panel; use Filament\PanelProvider; use Orion\FilamentFeedback\FeedbackPlugin; class AdminPanelProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugin( FeedbackPlugin::make() ->sendResponsesTo(email: 'oriondevelops@gmail.com') ); } }
You can now click on the "Feedback" menu item in your Filament app to see the feedback plugin.
Customizing visibility
Define who can view the feedback page.
<?php namespace App\Providers\Filament; use Filament\Panel; use Filament\PanelProvider; use Orion\FilamentFeedback\FeedbackPlugin; class AdminPanelProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugin( FeedbackPlugin::make() ->visible(fn() => auth()->user()->can('view feedback page')) ); } }
Customizing the navigation item
<?php namespace App\Providers\Filament; use Filament\Panel; use Filament\PanelProvider; use Orion\FilamentFeedback\FeedbackPlugin; class AdminPanelProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugin( FeedbackPlugin::make() ->slug('feedback') ->label('Feedback') ->icon('heroicon-o-face-smile') ->group('Help') ->sort(3), ); } }
Customizing the page
<?php namespace App\Providers\Filament; use Filament\Panel; use Filament\PanelProvider; use Orion\FilamentFeedback\FeedbackPlugin; use App\Filament\Pages\ExtendedFeedbackPage; class AdminPanelProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugin( FeedbackPlugin::make() ->page(ExtendedFeedbackPage::class), ); } }
Contributing
Please see CONTRIBUTING for details.
Security
Please review Security Policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.