> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pushctl.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Laravel notification channel

> Send Pushctl messages through Laravel notifiables, routes, and queued notifications.

The channel calls `toPushctl` on your notification and resolves the recipient from Laravel's notification routing.

## Route one or several users

```php theme={null}
public function routeNotificationForPushctl(Notification $notification): string|array
{
    return $this->pushctl_user_ids;
}
```

Empty or `null` routes skip the channel without sending. Duplicate IDs are removed before the request.

## Queue the notification

Use Laravel's normal queued-notification pattern:

```php theme={null}
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;

final class OrderReady extends Notification implements ShouldQueue
{
    use Queueable;

    // via() and toPushctl() ...
}
```

<Tip>Queue server-side sends so provider or network latency does not delay a web request.</Tip>

## Send directly

```php theme={null}
use Pushctl\PushctlLaravel\Messages\PushctlMessage;
use Pushctl\PushctlLaravel\Pushctl;

$response = app(Pushctl::class)->send(
    PushctlMessage::create('Welcome')->with('screen', 'home'),
    ['user-123', 'user-456'],
);
```

The method returns Laravel's HTTP `Response` and throws for unsuccessful responses.
