PHP code example of codetechnl / laravel-taskbridge-filament-4

1. Go to this page and download the library: Download codetechnl/laravel-taskbridge-filament-4 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/ */

    

codetechnl / laravel-taskbridge-filament-4 example snippets


use CodeTechNL\TaskBridgeFilament\TaskBridgePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            TaskBridgePlugin::make(),
        ]);
}

use CodeTechNL\TaskBridgeFilament\Enums\JobPickerSize;

TaskBridgePlugin::make()
    ->navigationGroup('Infrastructure')
    ->navigationLabel('Scheduler')
    ->navigationIcon('heroicon-o-clock')
    ->navigationSort(50)
    ->slug('scheduler')
    ->heading('Scheduled Jobs')
    ->subheading('Manage your AWS EventBridge schedules')
    ->paginationPageOptions([10, 25, 50])
    ->defaultPaginationPageOption(25)
    ->groupActions()                         // collapse row actions into a dropdown
    ->preventDuplicates(true)                // block the same class being registered twice
    ->jobPickerSize(JobPickerSize::Large)    // Medium (default), Large, or Xl
    ->withoutWidget()                        // remove the stats widget
    ->withoutRunLog()                        // remove the Run Logs page
    ->runLogNavigationLabel('Job History')
    ->runLogSlug('job-history')
    ->runLogPaginationPageOptions([25, 50])

TaskBridgePlugin::make()
    ->policy(App\Policies\ScheduledJobPolicy::class)

use CodeTechNL\TaskBridge\Attributes\SchedulableJob;

#[SchedulableJob(name: 'Daily Report — Finance', group: 'Finance', cron: '0 8 * * 1-5')]
class SendDailyReport implements ShouldQueue { ... }

use CodeTechNL\TaskBridge\Contracts\HasCustomLabel;
use CodeTechNL\TaskBridge\Contracts\HasGroup;

class SendDailyReport implements HasCustomLabel, HasGroup, ShouldQueue
{
    public function taskLabel(): string
    {
        return 'Daily Report — Finance';
    }

    public function group(): string
    {
        return 'Finance'; // Overrides the folder-based detection.
    }
}
bash
php artisan make:filament-theme admin