Interface LaravelUi5\Sdk\Execution\Contracts\UnitMessagesInterface

The messages of the unit of work in progress — for code that runs inside it without holding its transaction: a model's observer, a trait on a model, a service a handler calls. What you add here reaches the person as the handler's own messages do — in an action's response, in a command's output.

It adds messages only. A refusal throws (the unit rolls back); the seal stays with the unit. Outside a unit of work, or after the unit has sealed, a message is written to the log instead of being shown.

public function __construct(private UnitMessagesInterface $messages) {}

$this->messages->warning(MessageText::of('messages.trip.default_skipped', [$code]));
  • LaravelUi5\Sdk\Execution\Contracts\UnitMessagesInterface
    • LaravelUi5\Sdk\Execution\UnitMessages implements UnitMessagesInterface
Methods