Forms\Components\FileUpload::make('file')
->label(__('labels.file'))
->directory('documents')
->afterStateUpdated(function ($state, Forms\Get $get) {
ray($get('file_name')); //null
ray($state);
})
->disk('local')
->storeFileNamesIn('file_name')
->required(fn(string $operation) => $operation === 'create')
->columnSpanFull(),
Forms\Components\FileUpload::make('file')
->label(__('labels.file'))
->directory('documents')
->afterStateUpdated(function ($state, Forms\Get $get) {
ray($get('file_name')); //null
ray($state);
})
->disk('local')
->storeFileNamesIn('file_name')
->required(fn(string $operation) => $operation === 'create')
->columnSpanFull(),