inertia-laravel
inertia-laravel copied to clipboard
[1.x] Exclude properties from partial responses
The PR introduces an ability to exclude properties from partial responses. The except
option can be used together with only
to refine nested props.
The corresponding client-side PR: https://github.com/inertiajs/inertia/pull/1876
router.visit(url, {
only: ['auth'],
except: ['auth.user'],
})
$props = [
// Included on partial reload
'auth' => [
// Excluded from partial reload
'user' => new LazyProp(function () {
return [
'name' => 'Jonathan Reinink',
'email' => '[email protected]',
];
}),
// Included on partial reload
'refresh_token' => 'value',
],
// Excluded from partial reload
'shared' => [
'flash' => 'value',
],
];
Please make sure to mark this as ready for review if you need one.
@driesvints just want to get the client PR ready first