Adds a new <x-turbo-refreshes-with method="morph" scroll="preserve" /> Blade component that can be used in layouts/pages to toggle on and off the page refresh behavior
Adds a new broadcastRefreshes property that can be toggled on a model that uses the Broadcasts trait. This will auto-wire the page refresh broadcasts for the current model. When the model was recently created, it dispatches it to the model's plural name by default (private-messages for a App\Models\Message model). Otherwise, it will automatically send the page refresh broadcasts to the current model's channel (private-App.Models.Message.1 for App\Models\Message with ID of 1)
Adds a new broadcastRefreshesTo property that can be toggled on a model that uses the Broadcasts trait. This will also auto-wire the page refresh broadcasts for the current model, but it will send the page refresh broadcasts to the streamable(s) defined in the property (usually a relationship)
Adds new recede, resume, and refresh assertion macros to the TestResponse class
Adds a way to suppress broadcasting to avoid sending them on a specific callback/scope
closes #126
Pending:
[x] Pass the Turbo Tracking Request ID in the page refresh broadcasts (should it also be sent on any other broadcasts too?)
[x] Add a debouncing mechanism to avoid sending multiple page refreshes to the same model within the same request in a short interval (this can happen when updating multiple models within the same request and using model touching, for instance. The idea is that if multiple page refreshes are triggered to same model within 500ms in the same request/scope, we should only send 1)
[x] Add a suppression mechanism so we can have a way to disable broadcasts if we want to (similar to Model::withoutTouching(fn), so similarly to the withoutTouching(fn) it should also allow suppressing broadcasts for specific models)
Added
<x-turbo-refreshes-with method="morph" scroll="preserve" />
Blade component that can be used in layouts/pages to toggle on and off the page refresh behaviorbroadcastRefreshes
property that can be toggled on a model that uses theBroadcasts
trait. This will auto-wire the page refresh broadcasts for the current model. When the model was recently created, it dispatches it to the model's plural name by default (private-messages
for aApp\Models\Message
model). Otherwise, it will automatically send the page refresh broadcasts to the current model's channel (private-App.Models.Message.1
forApp\Models\Message
with ID of1
)broadcastRefreshesTo
property that can be toggled on a model that uses theBroadcasts
trait. This will also auto-wire the page refresh broadcasts for the current model, but it will send the page refresh broadcasts to the streamable(s) defined in the property (usually a relationship)recede
,resume
, andrefresh
assertion macros to theTestResponse
classcloses #126
Pending:
Model::withoutTouching(fn)
, so similarly to thewithoutTouching(fn)
it should also allow suppressing broadcasts for specific models)