$payload * @property Carbon|null $created_at * @property Carbon|null $updated_at * * @method static Builder|Webhook newModelQuery() * @method static Builder|Webhook newQuery() * @method static Builder|Webhook query() * @method static Builder|Webhook whereCreatedAt($value) * @method static Builder|Webhook whereEndpoint($value) * @method static Builder|Webhook whereEvent($value) * @method static Builder|Webhook whereId($value) * @method static Builder|Webhook wherePayload($value) * @method static Builder|Webhook whereSuccessfulAt($value) * @method static Builder|Webhook whereUpdatedAt($value) * @method static Builder|Webhook whereWebhookConfigurationId($value) */ class Webhook extends Model { use HasFactory, MassPrunable; protected $fillable = ['payload', 'successful_at', 'event', 'endpoint']; public function casts() { return [ 'payload' => 'array', 'successful_at' => 'datetime', ]; } public function prunable(): Builder { return static::where('created_at', '<=', Carbon::now()->subDays(config('panel.webhook.prune_days'))); } }