PHP code example of spokospace / filament-ops-notify

1. Go to this page and download the library: Download spokospace/filament-ops-notify 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/ */

    

spokospace / filament-ops-notify example snippets


use Spokospace\OpsNotify\Filament\OpsNotifyPlugin;

$panel->plugin(OpsNotifyPlugin::make()->navigationGroup('System'));

// In a service provider's boot(), with your app's own admin check:
Gate::define('viewOpsNotify', fn (User $user): bool => $user->is_admin);

use Spokospace\OpsNotify\OpsMessage;

OpsMessage::make('build.completed')
    ->success()
    ->title('Frontend build completed')
    ->field('Duration', '4m 12s')
    ->button('Open site', 'https://shop.example')
    ->send();