PHP code example of daacreators / creators-ticketing

1. Go to this page and download the library: Download daacreators/creators-ticketing library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

daacreators / creators-ticketing example snippets


use Filament\Panel;
use Filament\PanelProvider;
use daacreators\CreatorsTicketing\TicketingPlugin;

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

TICKETING_NAV_GROUP="Creators Ticketing"

USER_MODEL="\App\Models\User"

TICKETING_NAV_FIELD=email
[email protected],[email protected]

TICKETING_USER_KEY_TYPE=char
TICKETING_USER_KEY_LENGTH=21

'navigation_visibility' => [
    'field' => 'email',
    'allowed' => ['[email protected]', '[email protected]']
],

use daacreators\CreatorsTicketing\Filament\Widgets\TicketStatsWidget;

class DashboardConfig extends Config
{
    public function widgets(): array
    {
        return [
            TicketStatsWidget::class,
        ];
    }
}

    'spam_protection' => [
        'enabled' => env('TICKETING_SPAM_PROTECTION', true),
        'rate_limiting' => [
            'enabled' => true,
            'max_tickets_per_hour' => 5,
            'max_tickets_per_day' => 20,
        ],
        'content_filtering' => [
            'enabled' => true,
            'check_links' => true,
            'max_links_allowed' => 3,
        ],
    ],
bash
php artisan vendor:publish --tag="creators-ticketing-config"

app/Providers/Filament/AdminPanelProvider.php
bash
php artisan migrate
bash
php artisan db:seed --class=daacreators\\CreatorsTicketing\\Database\\Seeders\\TicketStatusSeeder
bash
php artisan migrate
bash
php artisan vendor:publish --tag="creators-ticketing-translations"