you can use same widget for List and View/Edit. all you need is to wrap the `where()` statement in a `when()` function
@AugustineOsaretinКүн бұрын
This awesome lesson
@DeTechDivusКүн бұрын
As a tip, there is also getFooterWidgets.
@emmanuel71-devКүн бұрын
If you want to omit one of the values in the enum for a ToggleButton, you could do it like so: Forms\Components\ToggleButtons::make('status') ->options( collect(StatusEnum::cases()) ->filter(fn($status) => $status !== StatusEnum::CLOSED) ->mapWithKeys(fn($status) => [$status->value => $status->getLabel()]) ->toArray() ) ->colors( collect(StatusEnum::cases()) ->filter(fn($status) => $status !== StatusEnum::CLOSED) ->mapWithKeys(fn($status) => [$status->value => $status->getColor()]) ->toArray() ) ->icons( collect(StatusEnum::cases()) ->filter(fn($status) => $status !== StatusEnum::CLOSED) ->mapWithKeys(fn($status) => [$status->value => $status->getIcon()]) ->toArray() ),
@MelvinMihaylovКүн бұрын
Thanks for the helpful tutorial. Is it possible to show another example for MorphToSelect and how can we use it with Set and Get functionality with another field for example TagsInput
@Sam-s69v2 күн бұрын
When I click on sendinvoice, nothing happens? Do I have setup something else which is not mentioned in the tutorial?
@irismo912 күн бұрын
I can't do it, when I try to use php artisan make:filament-page Auth/Register it asks me to choose what kind of page I want to create, also it doesn't create it the same way as in the tutorial, but in a folder called RegisterResource, I think I'm doing something wrong.
@aries_dg2 күн бұрын
Once user is deactivated, how can i automatically log them out and display that validation error on login page?
@krekas2 күн бұрын
middleware
@nazar87ali2 күн бұрын
The filament creates a problem in performance
@krekas2 күн бұрын
so don't use it
@nazar87ali2 күн бұрын
@@krekas yes i not used it in big project and online project .
@relaxationtube23882 күн бұрын
I’ve used filament in a large project currently online and serving 100s of users. I did not notice any performance issue
@leonvanrijswijk84093 күн бұрын
Instead of copy/paste the code, is it possible to do something like 'call parentClass.authenticate()'? That way you would use the latest code of the parentclass when it is improved/updated.
@pauloclara47643 күн бұрын
happy new year... thanks for staying active on youtube... how can I keep track of user activity, i.e. know which items were created, changed or deleted by users...
@krekas3 күн бұрын
use package like spatie activity
@olivierperrier1143 күн бұрын
Happy new year ! Thank you for this useful content My approach would be to create a custum rule and call it in the email input but I never tried. Do you think it could work?
@krekas3 күн бұрын
why not try it?
@FilamentDaily3 күн бұрын
Yes that could probably also work
@H4L1M_3 күн бұрын
This should be the default!!!
@onlinebusinessblog29103 күн бұрын
Good day to you, i am having difficulty just now i discovered that my import modal is no longer opening, but it was working fine.
@DwikyRestu-nb4od6 күн бұрын
how to use numeric on custom fields?
@Sdirimohamedsalah7 күн бұрын
Thank you Povilas. I’m working on a form like this for real estate web app and I have a small problem. How change the repeating behavior? For example a house with 4 rooms 2 bathrooms.. how create 4 new fields based on text input field entered by the user to describe each room and upload photos ?
@FilamentDaily5 күн бұрын
Personally, I would create a separate page to describe each room if there are multiple photos to upload and more than one field. Otherwise the form is just too long to be filled conveniently, and much bigger possibility of bugs.
@H4L1M_7 күн бұрын
Isn't using a Policy better ? Am I missing something
@H4L1M_7 күн бұрын
Can we disable the Button while the next page is loading?
@luiscevallos19 күн бұрын
Happy new year ... Thanks for all
@peterstiens9 күн бұрын
Thanks a lot. That's what I was looking for.
@Sdirimohamedsalah10 күн бұрын
This video is a huge time saver! I think filament should implement this guide. Thank you Povilas ! I like the way you thinking out of the box
@aymanmalhattami11 күн бұрын
Great tip
@alfandirifaul11 күн бұрын
where can i found the Login.php, because i try for looking for that but i dont find it
@Sdirimohamedsalah12 күн бұрын
Great plugin!
@krishna__path_36513 күн бұрын
How do I search for a full name in a dropdown?
@ryiad201014 күн бұрын
thank you its very helpful
@alyxson14 күн бұрын
Hey!!, there are any performance differences on the user side by switching a long modal for a wizard?
@ibadurrahmanhafirizul994715 күн бұрын
Thank u for sharing your knowledge sir 🙌
@GiedriusKartanovic15 күн бұрын
You could further reduce repetition by passing reference to the method (PHP >=8.1) e.g. `->afterStateUpdated(self::updateTotalCost(...))`
@thugsofpunjab809117 күн бұрын
can someone tell how to customize this pacakge i want to customize the view of this pacakge
@leslieprice17 күн бұрын
Hi, when the sidebar is collapsed, how can one also collapse the button into an iconButton?
@محمدرضاخدامی20 күн бұрын
can i use another resource for that? i have a post and a author both have their resource and their infolist method inside their resource. i want to show author infolist when clicking on its name. is there a way to do that?
@jonnhybravo21 күн бұрын
great! But the modal is not opened in this way. Exists some tips?
@edgarteichert558721 күн бұрын
Hi, there. It's also possible to put the closure in the function itself. Then one just needs to put the function name in. E.g. ->afterStateUpdated(static::updateTotalCost()) then return fn($set, $get) => doSomething() in the function itself. Even less code and nice look.
@rishharris880821 күн бұрын
How to handle redirecting a removed user from a team to a specific route in a multi-tenancy
@faridmoreno286421 күн бұрын
Thank you for those tips! I have a question: How Can I put the some logic (total_cost) in a service class? Because, I want use this logic in other system parts :D
@FilamentDaily20 күн бұрын
Well yeah, create a service class and put a function with parameters in there, not sure what is the question here :)
@faridmoreno28646 күн бұрын
@@FilamentDaily Sorry, I meant how can I call the function in Filament resources?
@FilamentDaily6 күн бұрын
@@faridmoreno2864 Well you create the object of that service class and then call the function you need. Sorry hard to answer without specific examples.
@mrebene21 күн бұрын
Thanks for this video. I tried using the $set in my modal select box in a relation manager but it does not seem to work
@archiealvarado883122 күн бұрын
I am learning Filament. It is just a Livewire with the shortcuts. Is it still relevant in the future because it looks like low code programming. Should I master it? Here in the PH nobody uses it.
@FilamentDaily21 күн бұрын
It depends on what projects you wanna work with. For each kind of projects, there are different languages and frameworks. Filament definitely has its niche. The question is do you see that niche and wanna be part of it.
@marlo410822 күн бұрын
man you are fire🔥🔥🔥🔥🔥🔥
@0xshaheen22 күн бұрын
you can shorten it to this: ->afterStateUpdated( self::updateTotalCost(...) ) which will pass the parameters $set and $get to the callback, instead of doing it manually
@0xshaheen22 күн бұрын
I haven't tried it but I think it will work
@nazar87ali22 күн бұрын
why ->rules(['required']) not work with FileUpload
@KONEY.INDUSTRIAL22 күн бұрын
Nice! A bit akward when ->hint() is already used for something else... so in my case I attached the spinner to a ->helperText() which also render just below the clicked element. Thanks :)
@1io623 күн бұрын
i have question when i use userMenuItems to customize the user menuitems the lang always english even i switch to onther langage , this is my code ->userMenuItems([ 'profile' => MenuItem::make() ->label(fn() => auth()->user()->name) ->url(fn(): string => EditProfilePage::getUrl()) ->icon('heroicon-m-user-circle'), MenuItem::make() ->label(__('admin.profile')) ->url(fn(): string => EditProfilePage::getUrl()) ->icon('heroicon-o-cog-6-tooth'), 'logout' => MenuItem::make()->label(__('admin.log_out')) ]);
@FilamentDaily23 күн бұрын
See the first label is with fn() inside. Your other labels are without fn(). So you need to use that callback function inside.
@1io623 күн бұрын
@@FilamentDaily thank you ❤️🌹
@KaptainProdex23 күн бұрын
any drawbacks or why this isn't enabled by default? Thanks!
@FilamentDaily23 күн бұрын
Not sure, to be honest.
@farhanmaulana831923 күн бұрын
thanks alot man
@Claudio_Pereira23 күн бұрын
Thanks, Povilas, for this great tip.😊
@maruatajongte629323 күн бұрын
i used DB::Transactions, this would be so much easier
@mrmehdigh962224 күн бұрын
As Always, very useful video 3:25
@TrikNgonlen24 күн бұрын
Nah...ini dia yang saya butuhkan...MANTAP! Terima kasih, Om Povilas Korop...
@krekas24 күн бұрын
kitąkart rašyk angliškai
@TrikNgonlen24 күн бұрын
@@krekas Lah...emang Elu pake bahasa inggris?
@NexusAlfa23 күн бұрын
Bjir ngakak
@TrikNgonlen23 күн бұрын
@@NexusAlfa 😂🤣
@HindAALOUCH-u7x24 күн бұрын
Thank you so much about the videos you're making. I have a question about a situation I'm encoutring on my project. I have a PartnersRelationManager into my projectResource, I'm using create action if there are no partners to attach and then I show the attach btn. But what I really want, is to add a create btn in the attachAction, so I can create a new partner if I didn't find the exact partner to attach from the select list. Any ideas?? Thank you 👍
@FilamentDaily24 күн бұрын
All I can think about is this Select and Create Option: filamentphp.com/docs/3.x/forms/fields/select#creating-a-new-option-in-a-modal But not sure if you can use it in your situation with Relation Managers.
@HindAALOUCH-u7x24 күн бұрын
@@FilamentDaily I really don't know, but if there is a way to maintain the attachAction and use the select modal in it instead of the default select !!!? Any ideas of how to do it?!!! Thank you 🙂
@FilamentDaily23 күн бұрын
Sorry I don't have the answer to this
@HindAALOUCH-u7x23 күн бұрын
@@FilamentDaily Thank you, I'm still searching about it, if I found a solution I will let you know 👍
@HindAALOUCH-u7x21 күн бұрын
@@FilamentDaily Hello Povilas, here is the solution I found: Add extraModalFooterActions to the AttachAction and use inside it CreateAction like the following. ->extraModalFooterActions([ Tables\Actions\CreateAction::make() ]) This will add a btn 'create' beside the 'attach' btn inside the AttachAction modal. If you want to control the creation form, you can use ->form([ TextInput::make('input') ->label(__('projProgRelations.organism')) ->maxLength(255) ->required(), ]) Hope this help someone else 😇