mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 00:34:44 +02:00

* feat: First Webhook PoC draft * feat: Dispatch Webhooks PoC * fix: typo in webhook configuration scope * Update 2024_04_21_162552_create_webhooks_table.php Co-authored-by: Lance Pioch <lancepioch@gmail.com> * Update 2024_04_21_162552_create_webhooks_table.php Co-authored-by: Lance Pioch <lancepioch@gmail.com> * Update 2024_04_21_162544_create_webhook_configurations_table.php Co-authored-by: Lance Pioch <lancepioch@gmail.com> * Update 2024_04_21_162544_create_webhook_configurations_table.php Co-authored-by: Lance Pioch <lancepioch@gmail.com> * Update DispatchWebhooks.php Co-authored-by: Lance Pioch <lancepioch@gmail.com> * Update DispatchWebhooksJob.php Co-authored-by: Lance Pioch <lancepioch@gmail.com> * Update DispatchWebhookForConfiguration.php Co-authored-by: Lance Pioch <lancepioch@gmail.com> * Update DispatchWebhookForConfiguration.php Co-authored-by: Lance Pioch <lancepioch@gmail.com> * Update DispatchWebhookForConfiguration.php Co-authored-by: Lance Pioch <lancepioch@gmail.com> * Update DispatchWebhooksJob.php Co-authored-by: Lance Pioch <lancepioch@gmail.com> * Update DispatchWebhooksJob.php Co-authored-by: Lance Pioch <lancepioch@gmail.com> * Update DispatchWebhooksJob.php Co-authored-by: Lance Pioch <lancepioch@gmail.com> * chore: Implement Webhook Event Discovery * we got a test working for webhooks * WIP * Something is working! * More tests * clean up the tests now that they are passing * WIP * Don't use model specific events * WIP * WIP * WIP * WIP * WIP * Do it sync * Reset these * Don't need restored event type * Deleted some unused jobs * Find custom Events * Remove observers * Add custom event test * Run Pint * Add caching * Don't cache every single event * Fix tests * Run Pint * Phpstan fixes * Pint fix * Test fixes * Middleware unit test fix * Pint fixes * Remove index not working for older dbs * Use facade instead --------- Co-authored-by: Pascale Beier <mail@pascalebeier.de> Co-authored-by: Lance Pioch <lancepioch@gmail.com> Co-authored-by: Vehikl <go@vehikl.com>
22 lines
402 B
PHP
22 lines
402 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Webhook extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = ['payload', 'successful_at', 'event', 'endpoint'];
|
|
|
|
public function casts()
|
|
{
|
|
return [
|
|
'payload' => 'array',
|
|
'successful_at' => 'datetime',
|
|
];
|
|
}
|
|
}
|