sohail
sohail
FFilament
Created by sohail on 12/25/2024 in #❓┊help
Datepicker return time how to return date only
well i need the time but i let the user select the separately
27 replies
FFilament
Created by sohail on 12/25/2024 in #❓┊help
Datepicker return time how to return date only
datetimestring
27 replies
FFilament
Created by sohail on 12/25/2024 in #❓┊help
Datepicker return time how to return date only
and i would prefer if i didnt had to do that
27 replies
FFilament
Created by sohail on 12/25/2024 in #❓┊help
Datepicker return time how to return date only
no i want the date picker to only return date but it also return time with do so now everyvery is am using the date to formate or validate other input i have to do Carbon::parse($get('start_date'))->formate('Y-m-d')
27 replies
FFilament
Created by sohail on 12/25/2024 in #❓┊help
Datepicker return time how to return date only
what i dont understand what you mean
27 replies
FFilament
Created by sohail on 12/25/2024 in #❓┊help
Datepicker return time how to return date only
but it still return the date with time in only what the date not the time
27 replies
FFilament
Created by sohail on 12/25/2024 in #❓┊help
Datepicker return time how to return date only
in the min date you mean
27 replies
FFilament
Created by sohail on 12/25/2024 in #❓┊help
Datepicker return time how to return date only
right but where
27 replies
FFilament
Created by sohail on 12/25/2024 in #❓┊help
Datepicker return time how to return date only
sorry for the late reply
27 replies
FFilament
Created by sohail on 12/25/2024 in #❓┊help
Datepicker return time how to return date only
that does not do anything
27 replies
FFilament
Created by sohail on 12/25/2024 in #❓┊help
Datepicker return time how to return date only
there is only one carbon::now that on min date do you want me to change that one
27 replies
FFilament
Created by sohail on 12/10/2024 in #❓┊help
Filament Test Fails for Force Delete Action but Works in Browser
yes
livewire(Index::class)
->filterTable('trashed', 1) // make sure the trashed filtered is active
->callTableAction(ForceDeleteAction::class, $organization, ['confirmation' => 'Confirm'])
->assertHasNoTableActionErrors();
livewire(Index::class)
->filterTable('trashed', 1) // make sure the trashed filtered is active
->callTableAction(ForceDeleteAction::class, $organization, ['confirmation' => 'Confirm'])
->assertHasNoTableActionErrors();
5 replies
FFilament
Created by sohail on 12/9/2024 in #❓┊help
How to Structure Code for Filament Modules in Livewire?
this is how my index compoent look like regradless of the apporch
public function table(Table $table): Table
{
return $table->query(Organization::query())
->searchPlaceholder('Search For Organizations')
->columns($this->column())
->actions($this->actions())
->bulkActions($this->bulkActions())
->filters([
TrashedFilter::make('trashed')
->label('Deleted Organizations')
->native(false)
]);
}

public function render()
{
return view('livewire.organization.index');
}

protected function column(): array
{
return [
...column_here

];
}

protected function actions(): array
{
return [
ActionGroup::make([
Edit::create(), // $this->edit() when using traits
Restore::create(),
Delete::create(),
ForceDelete::create(),
])
->button()
->extraAttributes(['class' => 'hfi-action-group-btn'])
];
}

protected function bulkActions(): array
{
return [
BulkActionGroup::make([
BulkRestore::create(),
BulkDelete::create(),
BulkForceDelete::create(),
])
];
}
public function table(Table $table): Table
{
return $table->query(Organization::query())
->searchPlaceholder('Search For Organizations')
->columns($this->column())
->actions($this->actions())
->bulkActions($this->bulkActions())
->filters([
TrashedFilter::make('trashed')
->label('Deleted Organizations')
->native(false)
]);
}

public function render()
{
return view('livewire.organization.index');
}

protected function column(): array
{
return [
...column_here

];
}

protected function actions(): array
{
return [
ActionGroup::make([
Edit::create(), // $this->edit() when using traits
Restore::create(),
Delete::create(),
ForceDelete::create(),
])
->button()
->extraAttributes(['class' => 'hfi-action-group-btn'])
];
}

protected function bulkActions(): array
{
return [
BulkActionGroup::make([
BulkRestore::create(),
BulkDelete::create(),
BulkForceDelete::create(),
])
];
}
5 replies
FFilament
Created by sohail on 12/9/2024 in #❓┊help
How to Structure Code for Filament Modules in Livewire?
depending on the action i can also include the edit form inside the class since it part of the edit action but in some case where both the edit and create from is the same i just put inside the model so both class can access it
5 replies
FFilament
Created by sohail on 12/9/2024 in #❓┊help
How to Structure Code for Filament Modules in Livewire?
code example for using a class
class Edit
{
public static function create(): Action
{
return EditAction::make()
->icon('fal-pen-to-square')
->hidden(fn($record) => $record->deleted_at)
->fillForm(fn(Organization $organization) => $organization->toArray())
->form(self::form())
->slideOver();
}

private static function form(): array
{
return [
TextInput::make('name')
->required()
->maxLength(255),
TextInput::make('address')
->required()
->maxLength(1500),
Textarea::make('description')
->required()
->maxLength(3000),
];
}
}
class Edit
{
public static function create(): Action
{
return EditAction::make()
->icon('fal-pen-to-square')
->hidden(fn($record) => $record->deleted_at)
->fillForm(fn(Organization $organization) => $organization->toArray())
->form(self::form())
->slideOver();
}

private static function form(): array
{
return [
TextInput::make('name')
->required()
->maxLength(255),
TextInput::make('address')
->required()
->maxLength(1500),
Textarea::make('description')
->required()
->maxLength(3000),
];
}
}
5 replies
FFilament
Created by sohail on 12/5/2024 in #❓┊help
Trash Filter Selection & Page selection have white background on Darkmode
6 replies
FFilament
Created by sohail on 12/4/2024 in #❓┊help
How to add search bar to table Header & and make pagination always visable
@Povilas K something you can mention in the tutorial if you are using an Table Builder and not a Panel Builder then in the case use the livewire render method instead of mount so the button does not disappear after you make action like update, delete etc
7 replies
FFilament
Created by sohail on 12/4/2024 in #❓┊help
How to add search bar to table Header & and make pagination always visable
any ideas on to make the pagination fix to the bottom of the page so it always visable and easy to navigate
7 replies
FFilament
Created by sohail on 12/4/2024 in #❓┊help
How to add search bar to table Header & and make pagination always visable
hi sir thank you
7 replies
FFilament
Created by sohail on 12/3/2024 in #❓┊help
How to use custom icon
is there a way to replace default icon with my fontawsome icon it tried by it did not work
FilamentIcon::register([
'actions::edit-action.grouped' => 'fal-pen-to-square',
]);
FilamentIcon::register([
'actions::edit-action.grouped' => 'fal-pen-to-square',
]);
21 replies