PHP code example of arzcode / sisifo

1. Go to this page and download the library: Download arzcode/sisifo 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/ */

    

arzcode / sisifo example snippets


use Arzcode\Sisifo\SisifoPlugin;

$panel->plugin(SisifoPlugin::make());

// config/sisifo.php
'notifications' => [
    // Closure returning the recipient model for database notifications.
    'notifiable' => fn () => \App\Models\User::find(config('sisifo.notify_user_id')),
    'channels'   => [
        \Arzcode\Sisifo\Notifications\Channels\DatabaseNotificationChannel::class,
        \Arzcode\Sisifo\Notifications\Channels\PushoverChannel::class,
    ],
],

use Arzcode\Sisifo\Contracts\LlmProvider;

class MyLlmProvider implements LlmProvider
{
    public function text(string $instructions, string $input, ?int $maxTokens = null): string
    {
        // ...
    }
}

// In a service provider:
$this->app->bind(LlmProvider::class, MyLlmProvider::class);

use Arzcode\Sisifo\Contracts\NotificationChannel;
use Arzcode\Sisifo\Models\MailboxTask;

class SlackChannel implements NotificationChannel
{
    public function send(MailboxTask $task, string $title, string $body, bool $urgent): void
    {
        // ...
    }
}
bash
php artisan migrate
bash
php artisan vendor:publish --tag=sisifo-config              # config/sisifo.php
php artisan vendor:publish --tag=sisifo-migrations          # database/migrations
php artisan vendor:publish --tag=sisifo-settings-migrations # spatie settings migrations
php artisan vendor:publish --tag=sisifo-lang                # lang/vendor/sisifo
php artisan vendor:publish --tag=sisifo-views               # resources/views/vendor/sisifo