PHP code example of solution-forest / grid-layout-plugin
1. Go to this page and download the library: Download solution-forest/grid-layout-plugin library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
solution-forest / grid-layout-plugin example snippets
use SolutionForest\GridLayoutPlugin\Pages\Grid as BasePage;
use SolutionForest\GridLayoutPlugin\Components\Grid;
use SolutionForest\GridLayoutPlugin\Components\Grid\Row;
use SolutionForest\GridLayoutPlugin\Components\Grid\Column;
protected function getGridSchema(): array
{
return [
Components\Grid\Row::make([
Components\Grid\Column::make(
6,
\Filament\Widgets\StatsOverviewWidget\Card::make('Revenue', '$192.1k')
->description('32k increase')
->descriptionIcon('heroicon-s-trending-up')
->chart([7, 2, 10, 3, 15, 4, 17])
->color('success'),
),
Components\Grid\Column::make(
6,
\Filament\Widgets\StatsOverviewWidget\Card::make('Revenue', '$192.1k')
->description('3% decrease')
->descriptionIcon('heroicon-s-trending-down')
->chart([17, 16, 14, 15, 14, 13, 12])
->color('danger')
),
]),
\Filament\Widgets\StatsOverviewWidget\Card::make('Revenue', '$192.1k')
->description('7% increase')
->descriptionIcon('heroicon-s-trending-up')
->chart([15, 4, 10, 2, 12, 4, 12])
->color('success'),
new \Illuminate\Support\HtmlString("<div>Dummy Html Element</div>"),
view('welcome'),
];
}