Installation and setup | laravel-webhook-server-rust | Spatie       

 SPATIE  

laravel-webhook-server-rust
===========================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-webhook-server-rust](https://spatie.be/docs/laravel-webhook-server-rust/v1)  Installation and setup

 Version   v1      

 Other versions for crawler [v1](https://spatie.be/docs/laravel-webhook-server-rust/v1) 

  Installation and setup    
- [ Introduction ](https://spatie.be/docs/laravel-webhook-server-rust/v1/introduction)
- [ Installation and setup ](https://spatie.be/docs/laravel-webhook-server-rust/v1/installation-and-setup)
- [ Sending webhooks ](https://spatie.be/docs/laravel-webhook-server-rust/v1/sending-webhooks)
- [ Signing requests ](https://spatie.be/docs/laravel-webhook-server-rust/v1/signing-requests)
- [ Retrying failed webhooks ](https://spatie.be/docs/laravel-webhook-server-rust/v1/retrying-failed-webhooks)
- [ Transport options ](https://spatie.be/docs/laravel-webhook-server-rust/v1/transport-options)
- [ Events ](https://spatie.be/docs/laravel-webhook-server-rust/v1/events)
- [ Testing webhooks ](https://spatie.be/docs/laravel-webhook-server-rust/v1/testing-webhooks)
- [ Upgrading ](https://spatie.be/docs/laravel-webhook-server-rust/v1/upgrading)
- [ Testing ](https://spatie.be/docs/laravel-webhook-server-rust/v1/testing)
- [ Changelog ](https://spatie.be/docs/laravel-webhook-server-rust/v1/changelog)
- [ Support us ](https://spatie.be/docs/laravel-webhook-server-rust/v1/support-us)

 Installation and setup
======================

Requires Rust 1.99+ and Laravel Rust 0.1.0.

```
cargo add spatie-laravel-webhook-server
```

The Cargo package is `spatie-laravel-webhook-server`; Rust imports use `spatie_laravel_webhook_server`.

Register the provider and override typed defaults through the application's configuration:

```
use laravel::{Application, config::Env};
use spatie_laravel_webhook_server::{Config, service_provider};

let app = Application::configure()
    .replace_env(Env::default())
    .with_providers(|providers| { providers.add(service_provider()); })
    .with_config(|config, _| {
        config.set(Config { tries: 5, queue: "webhooks".into(), ..Config::default() });
    })
    .create();

assert_eq!(app.config().section::<Config>().tries, 5);
```

Real applications can keep normal environment loading instead of `replace_env`. The provider uses `spatie-laravel-package-tools` 0.1.0 from crates.io. Defaults run before application overrides. This package needs no database model, migrations or installation commands.

Run dispatch inside `app.scope(...)`, or an existing Laravel request/job scope. Queued dispatch uses the application's queue connection by default. Choose a persistent queue connection and run Laravel's queue worker for background delivery. A `sync` connection executes immediately and does not replay released attempts.

Register custom backoff strategies and event publishers in every worker as well as the web application. The job stores a strategy name, not an unserializable trait object. Configure worker hard timeouts longer than the webhook HTTP timeout.

See [sending webhooks](sending-webhooks), [retrying failed webhooks](retrying-failed-webhooks), and the [API reference](https://docs.rs/spatie-laravel-webhook-server).

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
