Byproduct of the Laravel 13 upgrade: composer's post-update-cmd runs `artisan boost:update`, and Boost went 2.1.3 to 2.4.x with the update. Refreshes CLAUDE.md and boost.json for the Laravel 13 / Livewire 4 stack, updates the livewire, pest and tailwindcss skills, replaces the developing-with-fortify skill with fortify-development, and adds new laravel-best-practices and octane-development skills. Generated output, not hand-edited. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1.0 KiB
1.0 KiB
Livewire 4 JavaScript Integration
Interceptor System (v4)
Intercept Messages
Livewire.interceptMessage(({ component, message, onFinish, onSuccess, onError }) => {
onFinish(() => { /* After response, before processing */ });
onSuccess(({ payload }) => { /* payload.snapshot, payload.effects */ });
onError(() => { /* Server errors */ });
});
Intercept Requests
Livewire.interceptRequest(({ request, onResponse, onSuccess, onError, onFailure }) => {
onResponse(({ response }) => { /* When received */ });
onSuccess(({ response, responseJson }) => { /* Success */ });
onError(({ response, responseBody, preventDefault }) => { /* 4xx/5xx */ });
onFailure(({ error }) => { /* Network failures */ });
});
Component-Scoped Interceptors
<script>
this.$intercept('save', ({ component, onSuccess }) => {
onSuccess(() => console.log('Saved!'));
});
</script>
Magic Properties
$errors- Access validation errors from JavaScript$intercept- Component-scoped interceptors