Tabs\Tab::make('Images')->hidden(fn($record) => !$record)->icon('heroicon-o-photo')->schema([ Forms\Components\Repeater::make('images') ->relationship() ->minItems(0) ->defaultItems(0) ->orderColumn('sort') ->columnSpan(2) ->schema([ Forms\Components\TextInput::make('name') ->required(), Forms\Components\FileUpload::make('file') ->directory(function ($record) { Log::info($record); return "quotes/{$record->id}"; }) ->image() ->imageEditor() ->imageResizeMode('contain') ->imageResizeTargetWidth(2048) ->imageResizeTargetHeight(2048) ->imageResizeUpscale(false) ->maxSize(4096) ]),]),
Tables\Columns\SelectColumn::make('rate') ->options([ '1' => '1 star', '2' => '2 stars', '3' => '3 stars', '4' => '4 stars', '5' => '5 stars', ]) ->hidden(function(Closure $get) { return $get('status') !== 'approved'; }) ->label('Calificación'),