### Install Filament Service Desk with Composer Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/README.md Install the Filament Service Desk plugin version 3.x via Composer. ```bash composer require jeffersongoncalves/filament-service-desk:"^3.0" ``` -------------------------------- ### Customize dashboard widgets per panel in config/filament-service-desk.php Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/README.md Configuration file example showing how to customize dashboard widgets per panel (admin, agent, user) in config/filament-service-desk.php. Widgets are scoped under each panel key. ```php // config/filament-service-desk.php 'admin' => [ // ... 'widgets' => [ \JeffersonGoncalves\FilamentServiceDesk\Admin\Widgets\ServiceDeskOverviewWidget::class, \JeffersonGoncalves\FilamentServiceDesk\Admin\Widgets\SlaComplianceWidget::class, \JeffersonGoncalves\FilamentServiceDesk\Admin\Widgets\TicketsByDepartmentWidget::class, // Add your custom widgets here ], ], 'agent' => [ // ... 'widgets' => [ \JeffersonGoncalves\FilamentServiceDesk\Agent\Widgets\AgentTicketStatsWidget::class, \JeffersonGoncalves\FilamentServiceDesk\Agent\Widgets\SlaBreachWidget::class, ], ], 'user' => [ // ... 'widgets' => [ \JeffersonGoncalves\FilamentServiceDesk\User\Widgets\MyTicketsOverviewWidget::class, ], ], ``` -------------------------------- ### Disable all widgets for a panel with empty array Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/README.md Configuration example to disable all widgets for a panel by setting its widgets key to an empty array. Shown for the admin panel. ```php 'admin' => [ // ... 'widgets' => [], // No widgets on admin dashboard ], ``` -------------------------------- ### Publish Filament Service Desk Translations Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/README.md Publishes the translation files for the Filament Service Desk package so they can be customized. Run this command after installing the package. ```bash php artisan vendor:publish --tag="filament-service-desk-translations" ``` -------------------------------- ### Publish Filament Service Desk Config Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/README.md Publish the plugin's configuration file (optional step). ```bash php artisan vendor:publish --tag="filament-service-desk-config" ``` -------------------------------- ### File Structure - Directory Tree Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/resources/boost/skills/filament-service-desk-development/SKILL.md Shows the directory structure of the plugin's src folder, including plugins, concerns, and subdirectories for Admin, Agent, and User. ```text src/ ├── ServiceDeskAdminPlugin.php # Admin plugin ├── ServiceDeskAgentPlugin.php # Agent plugin ├── ServiceDeskUserPlugin.php # User plugin ├── Concerns/HasServiceDeskPluginConfig.php # Shared trait ├── Admin/ │ ├── Resources/ # 13 resources │ └── Widgets/ # Overview, SLA, Departments ├── Agent/ │ ├── Pages/ # Queue, Dashboard │ ├── Resources/ # 2 resources │ └── Widgets/ # Stats, Breaches └── User/ ├── Pages/ # Knowledge Base ├── Resources/ # 2 resources └── Widgets/ # My Tickets ``` -------------------------------- ### Republish config with --force Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/README.md Republish the configuration file with --force if it was previously published, to apply the new panel-scoped structure. ```bash php artisan vendor:publish --tag="filament-service-desk-config" --force ``` -------------------------------- ### Run Package Tests with Composer Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/README.md Runs the test suite for the package using Composer. Use this command to execute all tests. ```bash composer test ``` -------------------------------- ### Service Delegation Pattern - Correct vs Wrong Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/resources/boost/skills/filament-service-desk-development/SKILL.md Shows the correct way to handle record creation by delegating to the service layer (TicketService) versus the wrong way that bypasses events and business rules. Use the service layer for all mutations. ```php // Correct - uses service layer protected function handleRecordCreation(array $data): Model { return app(TicketService::class)->create($data, auth()->user()); } ``` ```php // Wrong - bypasses events and business rules protected function handleRecordCreation(array $data): Model { return Ticket::create($data); } ``` -------------------------------- ### Admin Panel Plugin Configuration Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/README.md Configure the admin panel with the ServiceDeskAdminPlugin, enabling knowledge base, SLA, email channels, service catalog, and a custom navigation group. ```php use JeffersonGoncalves\FilamentServiceDesk\ServiceDeskAdminPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ ServiceDeskAdminPlugin::make() ->knowledgeBase(true) ->sla(true) ->emailChannels(true) ->serviceCatalog(true) ->navigationGroup('Service Desk'), ]); } ``` -------------------------------- ### Agent Panel Plugin Configuration Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/README.md Configure the agent panel with the ServiceDeskAgentPlugin for ticket handling and response. ```php use JeffersonGoncalves\FilamentServiceDesk\ServiceDeskAgentPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ ServiceDeskAgentPlugin::make(), ]); } ``` -------------------------------- ### User Panel Plugin Configuration Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/README.md Configure the user panel with the ServiceDeskUserPlugin, enabling knowledge base and service catalog for the self-service portal. ```php use JeffersonGoncalves\FilamentServiceDesk\ServiceDeskUserPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ ServiceDeskUserPlugin::make() ->knowledgeBase(true) ->serviceCatalog(true), ]); } ``` -------------------------------- ### Configure attachments in config/filament-service-desk.php Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/README.md Configuration for ticket attachments. allowed_extensions are resolved to MIME types via Symfony MimeTypes, max_file_size is in kilobytes (default 10240), and disk defaults to local. ```php // config/filament-service-desk.php 'attachments' => [ 'allowed_extensions' => ['jpg', 'jpeg', 'png', 'gif', 'webp', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'csv', 'txt', 'zip', 'rar'], 'max_file_size' => 10240, // in KB (10MB) 'disk' => 'local', ], ``` -------------------------------- ### Run Tests with Pest Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/resources/boost/skills/filament-service-desk-development/SKILL.md Command to run the test suite using Pest. Tests use Orchestra Testbench with a TestPanelProvider fixture. ```bash vendor/bin/pest ``` -------------------------------- ### Extending a Resource - Config Override Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/resources/boost/skills/filament-service-desk-development/SKILL.md Configuration snippet to override a resource in the admin panel. Place in config/filament-service-desk.php under the 'admin' key. ```php 'admin' => [ 'resources' => [ 'ticket' => App\Filament\Resources\CustomTicketResource::class, ], ], ``` -------------------------------- ### Update panel provider for ServiceDeskAdminPlugin Source: https://github.com/jeffersongoncalves/filament-service-desk/blob/3.x/README.md Shows the required changes to panel providers when upgrading from 3.0.x to 3.2.0. The class ServiceDeskPlugin is renamed to ServiceDeskAdminPlugin and the plugin ID changes from filament-service-desk to filament-service-desk-admin. ```diff -use JeffersonGoncalves\FilamentServiceDesk\ServiceDeskPlugin; +use JeffersonGoncalves\FilamentServiceDesk\ServiceDeskAdminPlugin; return $panel->plugins([ - ServiceDeskPlugin::make(), + ServiceDeskAdminPlugin::make(), ]); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.