Abinash
Abinash
FFilament
Created by Abinash on 7/19/2024 in #❓┊help
Select Field relationship on edit page
Forms\Components\Select::make('employee_code_with_full_name')
->label(__('cranberry-cookie::cranberry-cookie.form.input.employee_code_with_name'))
->searchable()
->relationship(
name: 'employee',
titleAttribute: 'employee_code_with_full_name',
modifyQueryUsing: function (Builder $query, string $operation) {
$query->where('status',EmployeeStatus::ACTIVE);
})
Forms\Components\Select::make('employee_code_with_full_name')
->label(__('cranberry-cookie::cranberry-cookie.form.input.employee_code_with_name'))
->searchable()
->relationship(
name: 'employee',
titleAttribute: 'employee_code_with_full_name',
modifyQueryUsing: function (Builder $query, string $operation) {
$query->where('status',EmployeeStatus::ACTIVE);
})
it shows emplyee id on edit page but i need to show the employee_code_with_full_name
11 replies
FFilament
Created by Abinash on 7/15/2024 in #❓┊help
Checkboxlist's checkbox checked or not
CustomCheckboxList::make('task_lists') ->relationship('task_lists', 'title', modifyQueryUsing: function (Builder $query, string $operation) use ($stage) { $query->where('stage_id', $stage->id)->orderBy('id', 'asc'); }) ->afterStateHydrated(function ($state, $component, ?EmployeeOffboarding $record) use ($stage) { if (!$record) return; $component->state($record->task_lists->pluck('id')->toArray()); })->afterStateUpdated(function($component){ }), how i can get the particular checkbox's(in which one i have recently performed action) status that checked or not CustomCheckboxList extends from CheckBoxList
4 replies