Events
All Shortify events extend ShortifyEvent, which implements ShouldQueue.
Ensure a queue worker is running (or use the sync queue driver) if you listen
for these events.
Soft deletes still fire UrlDeleted (Eloquent's deleted event).
| Event | When |
|---|---|
UrlCreated | Short URL created |
UrlDeleted | Short URL deleted (including soft delete) |
UrlExpired | URL marked expired for the first time |
UrlVisited | Visit recorded after a successful redirect |
InvalidUrlAttempted | Unknown / soft-deleted code hit |
ExpiredUrlAttempted | Expired code hit |
use BradieTilley\Shortify\Events\UrlVisited;
Event::listen(UrlVisited::class, function (UrlVisited $event): void {
// $event->url, $event->visit
});
Listeners that must run synchronously can still implement their own queue behaviour; the events themselves remain queued by default.