Yes you can add anything you want in the same page, explore the docs about Tables, and/or create a Custom Page instead of Filament Resource, and then use the Table on that Custom page, and add any custom things you want, that page becomes a Livewire component, then.
hello, I have a question, In my Filament project I want to export the filtered data to PDF and I'm using DomPDF. I'm able to export the complete 10 records of data from the database but after using a filter also it shows all the 10 entries.
Povilas, thank you for the content! One doubt, is it possible to implement enum in the SelectColumn component? From the documentation, it seems to be possible, SelectColumn::make('status')->options(Status::class)... However, in practice, it returns the error: Object of class App\Enums\ReservationStatus could not be converted to string.
@@FilamentDaily I have the cast in my model, as shown below: protected $casts = [ 'confirmed_at' => 'date', 'status' => LoyaltyStatus::class, ]; This works perfectly: TextColumn::make('status') ->label('Status') ->badge() ->toggleable(), If I try... error SelectColumn::make('status') ->options(ReservationStatus::class), I am trying to figure it out but I can't find the problem.😅
@@diogeneskonrad weird, it did work for me, maybe you have some non-standard value in the database? Maybe null somewhere? Only debugging with real data could answer.
Povilas, thank you for the content! Can you please cover topic about best practice in exception handling. For instance, action "Delete" but record cannot be deleted, model throws an exception with some message. How the message can be sent as notification? I was not able to find anything like that (I used to work with Nova and it does it out of the box for all exceptions).
@@ytorbyk I actually found an example from one of the tutorials we're working with. That could help. Tables\Actions\DeleteAction::make() ->action(function ($data, $record) { if ($record->customers()->count() > 0) { Notification::make() ->danger() ->title('Lead Source is in use') ->body('Lead Source is in use by customers.') ->send(); return; } Notification::make() ->success() ->title('Lead Source deleted') ->body('Lead Source has been deleted.') ->send(); $record->delete(); })
@@FilamentDaily I can see that would work however, logic is on presentation level, why cannot I just do default actions (Delete, Detach etc) and if it throws an exception display it as failure notification?
Because Filament can't assume for you what you want to do in case of exception. Not everyone uses notifications, it's an optional feature, so I guess the decision was to not force the notification on everyone and let the developer decide what to do in case of action (ANY action, not only delete) fails.
Good morning ... I'm a big fan of Laravel Daily .. I think I'll be a big fan of Filament Daily ... I have a question : creating a form when the field client number is filled in if it exists in the database, fill in the rest of the form ???
Example of such "reactive" form is in this tutorial: laraveldaily.com/post/filament-appointment-booking-re-use-admin-panel-form-on-public-page You need to make the client number field "live()" and then fill in the other fields from the DB.
Hi, I watch almost all of your videos, it’s great to see you are taking Filament seriously. Now I have some confusion. I am Laravel Vue Dev. All these years I have developed sites, CRMs, SaaS applications with vue and Laravel. Now seeing Filament, I feel like I must give it a shot. However, the problem is that, I am really confused about whether I should use filament in such applications.(SaaS, CRM etc.). Could you please give me a suggestion regarding this. It will be much appreciated.
We're just planning to create a course on how to build a CRM with Filament. But it will take weeks/months to publish, there's no quick answer here, sorry.
Best of Luck uncle Povilas 🎉
Just discovered this new channel thanks to your newsletter! Subscribed, and very excited for more Filament content.
Please invite the guys from the Filament team, it would be great to see them around here for a collab
The guys from the Filament team are very busy on the official Discord and in daily releases :)
@@FilamentDaily yeah i know, but you could easily schedule a day in the future ruclips.net/video/ni9LVSfkCd4/видео.html
What you sent here is an hour-long format video, I'm not planning such things on RUclips, at least for now.
I’m so happy you did this new channel!! Thanks a lot!
Thank you for taking time
Povilas, great launch! Thank you for sharing! 😊
Really very helpful video
.Thanks you So Much...
Thank this helps alot to figure out how such things worked!
2:40 PHP Enum class with Filament starts
Nice!! Best of luck :)
Great job🤩
Amazing , thanks
Hello Povilas, how do you manage tags? a tags table or save tags in a column where data is separated by commas or something like that?
Tags table, definitely. All the details in this course lesson: laraveldaily.com/lesson/filament-3/belongstomany-multi-select-relation-managers
Woohooo 😀
Nice vídeo. Thank you.
Please make a video a detailed guide to the relationship in the filament
I covered it pretty deeply in my course: laraveldaily.com/lesson/filament-3/select-dropdown-belongsto-radio
Thanks you for your effort , i consider filament is something great but what i see is only table can i add something else in the same page???
Yes you can add anything you want in the same page, explore the docs about Tables, and/or create a Custom Page instead of Filament Resource, and then use the Table on that Custom page, and add any custom things you want, that page becomes a Livewire component, then.
Can we make ENUM column editable?
🎉🎉🚀🤩
Is it possible to download the example to see the code?
Sorry we don't have the source available.
hello, I have a question, In my Filament project I want to export the filtered data to PDF and I'm using DomPDF. I'm able to export the complete 10 records of data from the database but after using a filter also it shows all the 10 entries.
how to use icons and labels self::Nombrada in the new ToggleButtons form field?
Bro, how can I add the form top of the table list resource
We finally found the time to write a tutorial about it: laraveldaily.com/post/filament-add-form-on-top-above-the-table
@@FilamentDaily omg thanks a lot.
I'm here before 100 subs 😎
How we can handle payments gateways using filament ??
This is not a Filament feature, so you would handle it the same way as in any Laravel project.
Povilas, thank you for the content! One doubt, is it possible to implement enum in the SelectColumn component? From the documentation, it seems to be possible, SelectColumn::make('status')->options(Status::class)... However, in practice, it returns the error:
Object of class App\Enums\ReservationStatus could not be converted to string.
Because you also need to cast the value of that Eloquent field to Enum, with $casts in the Model.
@@FilamentDaily
I have the cast in my model, as shown below:
protected $casts = [
'confirmed_at' => 'date',
'status' => LoyaltyStatus::class,
];
This works perfectly:
TextColumn::make('status')
->label('Status')
->badge()
->toggleable(),
If I try... error
SelectColumn::make('status')
->options(ReservationStatus::class),
I am trying to figure it out but I can't find the problem.😅
@@diogeneskonrad weird, it did work for me, maybe you have some non-standard value in the database? Maybe null somewhere? Only debugging with real data could answer.
@diogeneskonrad I also get the same error when using SelectColumn, and I really got overwhelmed trying to debug this error.
Any news on fixing it?
Great
Good news 🎉
Povilas, thank you for the content!
Can you please cover topic about best practice in exception handling.
For instance, action "Delete" but record cannot be deleted, model throws an exception with some message. How the message can be sent as notification?
I was not able to find anything like that (I used to work with Nova and it does it out of the box for all exceptions).
Good idea for an upcoming video in the following weeks, currently there's a queue on other topics. Adding this one to the to-do list!
@@FilamentDaily thank you! Meanwhile can you please point me on the documentation where I can find more information about it?)
@@ytorbyk I actually found an example from one of the tutorials we're working with. That could help.
Tables\Actions\DeleteAction::make()
->action(function ($data, $record) {
if ($record->customers()->count() > 0) {
Notification::make()
->danger()
->title('Lead Source is in use')
->body('Lead Source is in use by customers.')
->send();
return;
}
Notification::make()
->success()
->title('Lead Source deleted')
->body('Lead Source has been deleted.')
->send();
$record->delete();
})
@@FilamentDaily I can see that would work however, logic is on presentation level, why cannot I just do default actions (Delete, Detach etc) and if it throws an exception display it as failure notification?
Because Filament can't assume for you what you want to do in case of exception. Not everyone uses notifications, it's an optional feature, so I guess the decision was to not force the notification on everyone and let the developer decide what to do in case of action (ANY action, not only delete) fails.
🤩🤩
Great! But... enum values... I think they should be in the model...
It's a personal preference.
Good morning ... I'm a big fan of Laravel Daily .. I think I'll be a big fan of Filament Daily ... I have a question : creating a form when the field client number is filled in if it exists in the database, fill in the rest of the form ???
Example of such "reactive" form is in this tutorial: laraveldaily.com/post/filament-appointment-booking-re-use-admin-panel-form-on-public-page
You need to make the client number field "live()" and then fill in the other fields from the DB.
@@FilamentDaily thanks
Hi, I watch almost all of your videos, it’s great to see you are taking Filament seriously. Now I have some confusion. I am Laravel Vue Dev. All these years I have developed sites, CRMs, SaaS applications with vue and Laravel. Now seeing Filament, I feel like I must give it a shot. However, the problem is that, I am really confused about whether I should use filament in such applications.(SaaS, CRM etc.). Could you please give me a suggestion regarding this. It will be much appreciated.
We're just planning to create a course on how to build a CRM with Filament. But it will take weeks/months to publish, there's no quick answer here, sorry.
@@FilamentDaily Thanks for the reply. Whenever the course comes I will wait for it. That's going to be amazing I hope😍
Povilas!!