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.
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.
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.
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
@@faridmoreno2864 Well you create the object of that service class and then call the function you need. Sorry hard to answer without specific examples.
Happy new year ... Thanks for all
Great tip
You could further reduce repetition by passing reference to the method (PHP >=8.1) e.g. `->afterStateUpdated(self::updateTotalCost(...))`
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.
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.
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.
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.
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
Well yeah, create a service class and put a function with parameters in there, not sure what is the question here :)
@@FilamentDaily Sorry, I meant how can I call the function in Filament resources?
@@faridmoreno2864 Well you create the object of that service class and then call the function you need. Sorry hard to answer without specific examples.