Save Action in a separate file
hello , can I save the actions in a separate file to use it in multiple places and avoid code duplication..
thank you ..
Solution:Jump to solution
@Leandro Ferreira Was just wondering and thought to add a question maybe some else will have the same ... , figured that I can add a method like userform() that returns an array in the related model "User" for example
```php
public static function userForm() {
return [
textinput::make('email'),...
3 Replies
yes. What is the issue?
Solution
@Leandro Ferreira Was just wondering and thought to add a question maybe some else will have the same ... , figured that I can add a method like userform() that returns an array in the related model "User" for example
then just call it like
wherever I want the form
any other suggestions?