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.
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
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.
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.
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 :)
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.