Samer
Samer
FFilament
Created by Samer on 5/2/2024 in #❓┊help
Can Filter tab be disabled ? , it's there but you can't click on it ?
Can Filter tab be disabled ? , it's there but you can't click on it ? something like 'inactive' => Tab::make() ->modifyQueryUsing(fn (Builder $query) => $query->where('active', false)) ->disabled
4 replies
FFilament
Created by Samer on 4/7/2024 in #❓┊help
hide row grouping for single records ( for the grouping field)
Hi , trying to figure out a way to use grouping but only show the group section/header when there are multiple items in the group, and hide it and show just rows for other normal rows ( single rows where the group only include one row).
3 replies
FFilament
Created by Samer on 8/8/2023 in #❓┊help
how dynamically add form text Input or spatieTag into resource based on non related model
Hi , the scenario is I've spatietag but i've added TagsTypes as new model / table and added tags_type_id to tags and its working fine as i've resource to create types and save models/resourcesse which should show /use this type in pivot table (reporting_tags_model) and another resource to create tags in specific type. now my problem is in other resource lets name it transactionResource , in this transaction resource i need to add SpatiTag or even normal textInput to be created dynamically for each Tag Types that load them from pivot table ( table (reporting_tags_model which have tag_type_id and the model_name )) as if i added 5 tags types for transaction model i need 5 inputs in my transactions resource.
38 replies
FFilament
Created by Samer on 8/2/2023 in #❓┊help
how to pass uploaded file to Laravel Excel to load the content into array or repeater
Hi , im having an action on table header to bulk upload from an Excel sheet, I'm trying to pass the uploaded file to Laravel Excel to get the content then i'll pass that array to form, I'm trying to pass the attachment to $array = Excel::toArray(new UsersImport, 'users.xlsx'); , So i was trying to do something like $array = Excel::toArray(new ChartOfAccountImport($this->record), $this->record->attachement); so basically I want to know how to pass the file and which place to put that logic like is there is something like afterStep or AfterUpload event
->headerActions([
Action::make('Bulk Upload')->icon('heroicon-m-arrow-up-tray')

->iconPosition(IconPosition::After)

->steps([
Step::make('File Upload')
->description('Upload the Data File here')
->schema([
FileUpload::make('attachment')

])
->columns(1)

,
Step::make('Read file and Populate ')
->description('Check and Validation Data')
->schema([
Repeater::make('Accounts')
->schema([
TextInput::make('code')
->required()
->inlineLabel()

->maxLength(15),
TextInput::make('name')
->required()
->maxLength(100)
->inlineLabel(),
TextInput::make('shortname')

->maxLength(15)
->inlineLabel(),
])
->defaultItems(3)
->columns(3)

]),
Step::make('View Results')
->description('View the Results')
->schema([

]),
])
->headerActions([
Action::make('Bulk Upload')->icon('heroicon-m-arrow-up-tray')

->iconPosition(IconPosition::After)

->steps([
Step::make('File Upload')
->description('Upload the Data File here')
->schema([
FileUpload::make('attachment')

])
->columns(1)

,
Step::make('Read file and Populate ')
->description('Check and Validation Data')
->schema([
Repeater::make('Accounts')
->schema([
TextInput::make('code')
->required()
->inlineLabel()

->maxLength(15),
TextInput::make('name')
->required()
->maxLength(100)
->inlineLabel(),
TextInput::make('shortname')

->maxLength(15)
->inlineLabel(),
])
->defaultItems(3)
->columns(3)

]),
Step::make('View Results')
->description('View the Results')
->schema([

]),
])
2 replies
FFilament
Created by Samer on 4/26/2023 in #❓┊help
remove the single DeleteAction from specific records
remove the single DeleteAction from specific rows, for example, users with is_admin = 1 so admin users can't be deleted. tried to use this ->before(function (DeleteAction $action) { if (! $this->record->is_admin = 1) { but get that error about ' $this ' i'm very new 😄
30 replies