djphinesse
djphinesse
FFilament
Created by ChrisR on 10/6/2023 in #❓┊help
Updating state for laravel-model-states from a Filament form
I tried adding this code to my model but I still get the error.
22 replies
FFilament
Created by ChrisR on 10/6/2023 in #❓┊help
Updating state for laravel-model-states from a Filament form
No description
22 replies
FFilament
Created by ChrisR on 10/6/2023 in #❓┊help
Updating state for laravel-model-states from a Filament form
public function toLivewire(): array
{
return [
'price' => Product::get('price'),
];
}

public static function fromLivewire($value): static
{
$price = $value['price'];

return new static($price);
}
public function toLivewire(): array
{
return [
'price' => Product::get('price'),
];
}

public static function fromLivewire($value): static
{
$price = $value['price'];

return new static($price);
}
22 replies
FFilament
Created by ChrisR on 10/6/2023 in #❓┊help
Updating state for laravel-model-states from a Filament form
I added this to my productresource:
22 replies
FFilament
Created by ChrisR on 10/6/2023 in #❓┊help
Updating state for laravel-model-states from a Filament form
The cast works in the table but when I try to edit I get a mismatch type error
22 replies
FFilament
Created by ChrisR on 10/6/2023 in #❓┊help
Updating state for laravel-model-states from a Filament form
Sorry, I was referring to the wireable methods. Where do I put them since there’s no visible livewire class.
22 replies
FFilament
Created by ChrisR on 10/6/2023 in #❓┊help
Updating state for laravel-model-states from a Filament form
Hi, where do I put this? On the model?
22 replies