$updatedScreenIds = collect($screens)->map(fn(array $screen) => $screen['id'])->values(); $this->user->introScreens()->whereNotIn('id', $updatedScreenIds) ->with('media') ->delete();
SpatieMediaLibraryFileUpload
SpatieMediaLibraryFileUpload::make('app_intro_image') ->collection('my-collection') ->hiddenLabel() ->columnSpan(2) ->required() ->model($this->appIntro'),
public array $data
uuid
+data: array:3 [▼ "app_home_page_order" => array:2 [▶] "app_general_title" => "Stack App" "app_screens" => array:1 [▼ "2f70d635-e64f-4f7c-832b-67cf019dec2e" => array:4 [▼ "app_intro_id" => "f8dff274-3408-4d7a-a359-0e4cac89b0e4" "app_intro_title" => "1st new" "app_intro_description" => "Nice Feature" "app_intro_image" => [] ] ] ]
$this->section("Cart Notifications", [ Grid::make(1)->schema([ Toggle::make('recent_product_enabled') ->label('Enabled'), ])->extraAttributes([ 'style' => 'float: right; ' ]), TextInput::make('cart_title') ->label('Title') ->required(), Textarea::make('cart_content') ->label('Content') ->rows(2) ->required(), ])