Mail: [email protected]
Phone: +1(424)231-4091
Everything you need to know about NexoPOS.
Adding notices to a settings page might provide more details on how to deal with the displayed settings. It can be how to get an API key or what needs to be performed for the settings to work properly. Regardless of the reason, NexoPOS includes a way to display 4 types of notices: info, error, warning, and success.
The type of notice here defines its colors. You'll use one of these colors to match the expression of the severity of the notice.
To proceed, you must first define your Settings by creating a class that extends "App\Services\SettingsPage". In that class, we'll define our settings as follows:
Now, we'll add to the SettingsForm::tab method, the notices we want to display.
Additionally, we've added the class App\Classes\Notice which provides the fourth type of notice as a method. For example, we'll use "info" for a blue notice, "error" for a red notice, etc.
Now, we should have the following output on our settings page.
The form has no fields as we haven't set any fields.