<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
invaders-xx / filament-gridstack-dashboard example snippets
return [
];
use InvadersXX\FilamentGridstackDashboard\GridstackDashboardPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GridstackDashboardPlugin::make()
])
}
use InvadersXX\FilamentGridstackDashboard\GridstackDashboardPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GridstackDashboardPlugin::make()
->columns(3),
])
}
use InvadersXX\FilamentGridstackDashboard\GridstackDashboardPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GridstackDashboardPlugin::make()
->rows(3),
])
}
use InvadersXX\FilamentGridstackDashboard\GridstackDashboardPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GridstackDashboardPlugin::make()
->settingsPath('dashboard.settings'),
])
}
use InvadersXX\FilamentGridstackDashboard\GridstackDashboardPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GridstackDashboardPlugin::make()
->float(false),
])
}
use InvadersXX\FilamentGridstackDashboard\GridstackDashboardPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GridstackDashboardPlugin::make()
->disableDrag(true),
])
}
use InvadersXX\FilamentGridstackDashboard\GridstackDashboardPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GridstackDashboardPlugin::make()
->disableResize(true),
])
}
use InvadersXX\FilamentGridstackDashboard\GridstackDashboardPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GridstackDashboardPlugin::make()
->resizable('all'),
])
}
use InvadersXX\FilamentGridstackDashboard\GridstackDashboardPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GridstackDashboardPlugin::make()
->navigationIcon('heroicon-o-chart-bar')
->navigationGroup('Admin')
->shouldRegisterNavigation(false)
->canAccess(fn() => auth()->id()===1)
->navigationLabel('Dashboard')
->navigationSort(1),
])
}
[
'widget' => AccountWidget::class, // Widget class
'x' => 0, // starting column on the grid
'y' => 0, // row on the grid
'w' => 12, // number of columns on the grid
]
use InvadersXX\FilamentGridstackDashboard\GridstackDashboardPlugin;
use Filament\Widgets\AccountWidget;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GridstackDashboardPlugin::make()
->defaultGrid([
[
'widget' => AccountWidget::class,
'x' => 0,
'y' => 0,
'w' => 12,
],
]),
])
}