Sam  ツ
Sam ツ
FFilament
Created by Sam ツ on 10/5/2024 in #❓┊help
Submit button when editing table data
Hi, I am new to laravel and filament, in a table I have several fields that can be updated such as date and some booleans: After some states have been updated I want to send customers a mail with an update regarding their order. Problem is that I do not want these mails to be directly sent and I'd rather have a submit button in the corner that the changes to the table can be submitted to prevent incorrect mails being send. What would be a good method doing this, here is an example of one field that is being updated:
ToggleColumn::make('no_longer_available')->label("No Longer Available")->afterStateUpdated(function ($record) {
if ($record->no_longer_available == true) {
$this->orderNotificationService->notifyCustomerNLA($record->order_id, $record->id);

}
}),
ToggleColumn::make('no_longer_available')->label("No Longer Available")->afterStateUpdated(function ($record) {
if ($record->no_longer_available == true) {
$this->orderNotificationService->notifyCustomerNLA($record->order_id, $record->id);

}
}),
2 replies
FFilament
Created by Sam ツ on 1/18/2024 in #❓┊help
Best method to use
No description
6 replies
FFilament
Created by Sam ツ on 1/17/2024 in #❓┊help
Infolist and foreignid
Hi, I am quite new to laravel / filaments and am transfering one of my projects to Filament but I am struggling with foreign keys (I do think the answer might be quite straightforward) I am trying to show data retrieved from a foreign key, I want to retrieve the serial_number vfrom "devices" via the constrain that exists with "tasks" I can not quite find any documentation of this This is my infolist
Section::make("Technical Information")->schema([
Group::make([
TextEntry::make('task_reference')->name("Task Nr")->copyable()->inlineLabel(),
TextEntry::make('serial_number')->,

]),


]),
Section::make("Technical Information")->schema([
Group::make([
TextEntry::make('task_reference')->name("Task Nr")->copyable()->inlineLabel(),
TextEntry::make('serial_number')->,

]),


]),
And this is my constrain as defined in tasks
public function device()
{
return $this->belongsTo(Device::class);
}
public function device()
{
return $this->belongsTo(Device::class);
}
Thanks in advance!
5 replies