F
Filament2mo ago
Neamix

Filament Cant find has uploading message

I tried to added file upload ti my form but i keeping getting that error
PHP Fatal error: Trait "Filament\Forms\Components\Concerns\HasUploadingMessage" not found in D:\Projects\Refk Project\Refk api\vendor\joshembling\image-optimizer\src\Components\BaseFileUpload.php on line 22.
PHP Fatal error: Trait "Filament\Forms\Components\Concerns\HasUploadingMessage" not found in D:\Projects\Refk Project\Refk api\vendor\joshembling\image-optimizer\src\Components\BaseFileUpload.php on line 22.
here us my form code
->schema([
Section::make('Coupon details')
->description('Provide information about the coupon')
->collapsible()
->schema([
Forms\Components\TextInput::make('code')
->required()
->maxLength(255)
->columnSpan(1),
Forms\Components\TextInput::make('discount')
->required()
->maxLength(255),
Forms\Components\Toggle::make('used')
->required()
->columnSpan(1),
Select::make('user_id')
->columnSpan(1)
->relationship(name: 'user')
->getOptionLabelFromRecordUsing(fn (User $record) => "#{$record->id} {$record->firstname} {$record->surname}")
->preload()
->searchable()
->required()
->optionsLimit(20),
FileUpload::make('avatar')
])->columns(2),
]);
->schema([
Section::make('Coupon details')
->description('Provide information about the coupon')
->collapsible()
->schema([
Forms\Components\TextInput::make('code')
->required()
->maxLength(255)
->columnSpan(1),
Forms\Components\TextInput::make('discount')
->required()
->maxLength(255),
Forms\Components\Toggle::make('used')
->required()
->columnSpan(1),
Select::make('user_id')
->columnSpan(1)
->relationship(name: 'user')
->getOptionLabelFromRecordUsing(fn (User $record) => "#{$record->id} {$record->firstname} {$record->surname}")
->preload()
->searchable()
->required()
->optionsLimit(20),
FileUpload::make('avatar')
])->columns(2),
]);
3 Replies
Smykoil
Smykoil2mo ago
try composer install show composer.json is the file definitely there?
Neamix
Neamix2mo ago
i tried no hope added to that filament is working if i removed fileuploder "require": { "php": "^8.1", "blade-ui-kit/blade-heroicons": "^2.3", "filament/filament": "^3.2", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^10.10", "laravel/sanctum": "^3.3", "laravel/tinker": "^2.8" },
Dennis Koch
Dennis Koch2mo ago
Try to remove vendor and reinstall