'SelectColumn ' i am using in my project
SelectColumn::make('status')
->options([
'draft' => 'Draft',
'reviewing' => 'Reviewing',
'published' => 'Published',
]) This is my code i am saved inside the table field like status ,but i need to save one more place inside Json field so how to update the field using select column can anyone explain or how to achieve this?
1 Reply
One way you can do this by using eloquent observer.
https://laravel.com/docs/10.x/eloquent#observers
in the created and updated event you can update again in different field.
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.