sezohussien
sezohussien
FFilament
Created by sezohussien on 10/23/2024 in #❓┊help
Getting 403 Forbidden when uploading S3 image
No description
7 replies
FFilament
Created by sezohussien on 8/18/2024 in #❓┊help
Action form wizard select options problem
No description
4 replies
FFilament
Created by sezohussien on 8/14/2024 in #❓┊help
SpatieFileUpload data not getting with getState()
I have custom page in filament
use Filament\Pages\Page;
class CareerApplyJob extends Page
use Filament\Pages\Page;
class CareerApplyJob extends Page
and file upload field
Forms\Components\SpatieMediaLibraryFileUpload::make('personal_photo')
->preserveFilenames()
->label('Personal photo')
->collection('personal_photo')
->visibility('publico')
->disk(config('filesystems.default'))
->openable()
->previewable()
->acceptedFileTypes([
'image/jpeg',
'image/png',
])
->maxSize(2048)
->required()
Forms\Components\SpatieMediaLibraryFileUpload::make('personal_photo')
->preserveFilenames()
->label('Personal photo')
->collection('personal_photo')
->visibility('publico')
->disk(config('filesystems.default'))
->openable()
->previewable()
->acceptedFileTypes([
'image/jpeg',
'image/png',
])
->maxSize(2048)
->required()
when getting the dd($this->form->getState()); the data of files not comming
4 replies
FFilament
Created by sezohussien on 7/31/2024 in #❓┊help
Default options of checkbox list
I have this section :
Section::make()
->schema([
Forms\Components\Repeater::make('academies')
->label('academies')
->relationship('academies')
->schema([
Forms\Components\TextInput::make('title')
->label('title')
->disabled(),

Forms\Components\CheckboxList::make('roles')
->label('roles')
->options(function ($record) {
return $record->roles->pluck('name', 'id')->toArray();
})
->formatStateUsing(function ($record) use ($form) {
$userRoleIds = $form->model->roles->pluck('id')->toArray();

$currentCheckBoxId = //ID
return in_array($currentCheckBoxId,$userRoleIds);
})
])
->addable(false)
->columns(1),
])
->columnSpan([
'sm' => 2,
]),
Section::make()
->schema([
Forms\Components\Repeater::make('academies')
->label('academies')
->relationship('academies')
->schema([
Forms\Components\TextInput::make('title')
->label('title')
->disabled(),

Forms\Components\CheckboxList::make('roles')
->label('roles')
->options(function ($record) {
return $record->roles->pluck('name', 'id')->toArray();
})
->formatStateUsing(function ($record) use ($form) {
$userRoleIds = $form->model->roles->pluck('id')->toArray();

$currentCheckBoxId = //ID
return in_array($currentCheckBoxId,$userRoleIds);
})
])
->addable(false)
->columns(1),
])
->columnSpan([
'sm' => 2,
]),
How can I compare the current checkbox id with the User resource role id to make it checked ?
47 replies
FFilament
Created by sezohussien on 6/25/2024 in #❓┊help
How to configure filament with multi-tenancy (Single DB) for one to one relationship with tenant ?
I have seen the docs for mulit-tenancy in filament documentation. but I can not setup one to one relationship for tenant to user
3 replies
FFilament
Created by sezohussien on 6/25/2024 in #❓┊help
When ever I select input or type something its refresh the page and redirect me back to /dashbaord
No description
3 replies
FFilament
Created by sezohussien on 6/10/2024 in #❓┊help
Livewire page component layout view not found: [components.layouts.app]
No description
2 replies