Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
tipuloidea
/
back
/
vendor
/
spatie
/
laravel-data
/
src
/
Attributes
:
AutoInertiaDeferred.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Spatie\LaravelData\Attributes; use Attribute; use Closure; use Spatie\LaravelData\Lazy; use Spatie\LaravelData\Support\DataProperty; use Spatie\LaravelData\Support\Lazy\InertiaDeferred; #[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_PROPERTY)] class AutoInertiaDeferred extends AutoLazy { public function __construct( protected ?string $group = null, ) { } public function build(Closure $castValue, mixed $payload, DataProperty $property, mixed $value): InertiaDeferred { return Lazy::inertiaDeferred(fn () => $castValue($value), $this->group); } }