Mail: [email protected] Phone: +1(424)231-4091

ns.forms

This filter is used to register or edit existing forms. On NexoPOS, forms are defined on the directory app/Forms and registered on the service provider app/Providers/FormsProvider.php. The filter ns.forms support two parameters: the class that needs to be returned and the identifier that needs to be matched.

If NexoPOS tries to load a custom form with the identifier "your-custom-id", it will provide as an identifier that value, and while registering your class, you need to check if there is a match. Here is an example.

We're here to define a custom form on our module that has the identifier "YourModule". Every time NexoPOS needs a form having the identifier "your-custom-id", it will have the class "YourCustomForm". If the $identifier doesn't match our identifier, we must return the $class value. This is necessary as the form might be defined and handled by either the core or another module.