Advanced FilamentPHP Support Ticketing System

1.0.0 2024-11-17 12:16 UTC

This package is auto-updated.

Last update: 2025-04-17 13:14:09 UTC


README

A comprehensive, customizable support ticketing system built for FilamentPHP with advanced notification, workflow, and reporting capabilities.

Features

  • 🌐 Multi-language Support
    • Automatic language detection
    • User language preferences
    • Easy translation management
    • Built-in English and Spanish translations
  • 🎨 Highly Customizable
    • Custom fields support
    • Industry-specific adaptations
    • Flexible workflows
    • Configurable notifications
  • 📊 Advanced Reporting
    • Custom metric calculations
    • Flexible filtering
    • Multiple export formats
    • Scheduled reporting
  • 🔔 Smart Notifications
    • Customizable triggers
    • Multiple channels
    • Template support
    • Scheduled notifications
  • ⚙️ Workflow Management
    • Custom workflow definitions
    • Transition validation
    • State management
    • Automated actions

Requirements

  • PHP 8.2+
  • Laravel 11.x
  • FilamentPHP 3.2+

Installation

composer require mavrickdeveloper/ticksya

Configuration

  1. Publish the configuration file:
php artisan vendor:publish --tag="ticksya-config"
  1. Publish the translations (optional):
php artisan vendor:publish --tag="ticksya-translations"
  1. Run the migrations:
php artisan migrate
  1. Configure your environment variables in .env:
# Core Settings
TICKSYA_QUEUE_CONNECTION=redis
TICKSYA_CACHE_DRIVER=redis

# Notification Settings
TICKSYA_NOTIFICATIONS_ENABLED=true
TICKSYA_NOTIFICATION_CHANNELS=["mail","slack"]

# Workflow Settings
TICKSYA_DEFAULT_WORKFLOW=standard
TICKSYA_WORKFLOW_VALIDATION=true

# Language Settings
TICKSYA_DEFAULT_LOCALE=en
TICKSYA_FALLBACK_LOCALE=en
TICKSYA_AUTO_DETECT_LOCALE=true
TICKSYA_USE_BROWSER_LOCALE=true
TICKSYA_SHOW_LANGUAGE_SELECTOR=true

Usage

Basic Setup

  1. Add the necessary traits to your User model:
use Ticksya\Traits\HasTickets;
use Ticksya\Traits\HasTicketNotifications;

class User extends Authenticatable
{
    use HasTickets, HasTicketNotifications;
}
  1. Register the plugin in your Panel provider:
use Ticksya\TicksyaPlugin;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->plugins([
                TicksyaPlugin::make(),
            ]);
    }
}

Multi-language Support

  1. Enable language support in your models:
use Ticksya\Traits\HasLocalization;

class YourModel extends Model
{
    use HasLocalization;
}
  1. Add the language selector to your Filament resources:
use Ticksya\Filament\Components\LanguageSelector;

class YourResource extends Resource
{
    public function getHeaderActions(): array
    {
        return [
            LanguageSelector::make(),
        ];
    }
}
  1. Add new languages:
    • Create translation file: resources/lang/{locale}/ticksya.php
    • Add locale to config: config/ticksya.php

Custom Fields

  1. Define custom fields in config:
// config/ticksya.php
'custom_fields' => [
    'healthcare' => [
        'patient_id' => [
            'type' => 'string',
            'required' => true,
            'validation' => 'required|string|max:255',
        ],
    ],
],
  1. Use custom fields in your tickets:
$ticket->setCustomField('patient_id', 'P12345');

Custom Workflows

  1. Create a workflow class:
use Ticksya\Workflows\BaseWorkflow;

class HealthcareWorkflow extends BaseWorkflow
{
    public function configure(): void
    {
        $this->addState('triage')
            ->addState('diagnosis')
            ->addState('treatment')
            ->addTransition('triage', 'diagnosis')
            ->addTransition('diagnosis', 'treatment');
    }
}
  1. Register the workflow:
// config/ticksya.php
'workflows' => [
    'healthcare' => HealthcareWorkflow::class,
],

Customization

Regional Adaptations

  • Timezone configurations
  • Date/time format support
  • Localization options
  • Currency settings

Industry-Specific Features

  • Healthcare (HIPAA compliance)
  • E-commerce support
  • Financial services
  • Real estate management

Workflow Management

  • Custom state definitions
  • Transition rules
  • Automated actions
  • SLA monitoring

Reporting Capabilities

  • Custom metrics
  • Scheduled reports
  • Export formats
  • Dashboard widgets

Security

  • Role-based access control
  • Custom field validation
  • Secure data storage
  • Audit logging

Contributing

Please see CONTRIBUTING.md for details.

License

The MIT License (MIT). Please see License File for more information.