BUILD YOUR OWN WIDGET
WHAT IS A WIDGET?
A widget is a partial view in dashboard that displays a specific set of data.
When building a custom widget, it will have its own directory, and will have its own files you can deal with to get full control of your widget template.
So let's begin building our first custom widget:
1.) First thing to do is using our CLI tool:
php artisan backend:widget-create
After that command, it will ask you three question that look like this:
- WIDGET NAME: The name of your custom widget.
- WIDGET DESCRIPTION: The description of your custom widget.
2.) After you have completed above instructions, You will see a new space for your widget view in dashboard:
2.) On your
app/Backend/ComponentsYou will also see the folder and files of your new widget.
You will notice the folder app/Backend/Widgets/EcommerceInsights. That is our new widget. It has its own files that you can work on what ever you want to display on its template.