API reference

Waypoint Facade: Log Activities Manually

Use the Waypoint facade for everything that isn't a model change and to control how activities are written.

Method
Description
log(string $event)
Starts a new activity, finish it with save()
causer(?Model $user)
Sets the causer for all following activities
pause() / resume()
Stops and continues logging for the current request
batch(callable $callback)
Groups all activities of the callback under one batch ID

Examples

php
use Waypoint\Facades\Waypoint;

Waypoint::log('exported')
    ->on($report)
    ->with(['format' => 'csv', 'rows' => 1250])
    ->save();

Waypoint::batch(function () use ($order) {
    $order->markAsShipped();
    $order->invoice->markAsPaid();
});

Last updated: