Widgets

⚛️ Atomic Panel ships with Widgets area in model index .

Widget 🔥 Atomic Model has AtomicWidgets method.

AtomicWidgets()

🔥 This method to register widgets to model index.

public static function AtomicWidgets()
{
    return [
    new WidgetClass()
    ];
}
1
2
3
4
5
6

CanSee()

if you want to authorize widget for custom users or condition you can use canSee method return false or true to hide or show field:

    (new WidgetClass())->canSee(function (){
      return false;
     })
1
2
3

widgetCols()

Default Columns is set by widget developer , if you want to override it use widgetCols method :

    (new WidgetClass())->canSee(function (){
      return false;
     })->widgetCols(12)
1
2
3