PHP code example of toproplus / laravel-admin-ext-uibox
1. Go to this page and download the library: Download toproplus/laravel-admin-ext-uibox 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/ */
toproplus / laravel-admin-ext-uibox example snippets
use Toproplus\UiBox\Widgets\StatisticsInfoBox;
$row->column(12, function (Column $column) {
$data = ['总计' => 999999, '昨天' => 999, '今天' => 999];
$stastics = new StatisticsInfoBox('新增用户数', $data, 'purple', 'users');
$column->append($stastics->render());
});
use Toproplus\UiBox\Widgets\JsonFormatBox;
$grid->column('json_string', 'Json字符串')->display(function ($json_string) {
$jsonFormat = new JsonFormatBox($json_string);
return $jsonFormat->render();
});
use Toproplus\UiBox\Widgets\MarkdownBox;
$row->column(12, function (Column $column) {
$mdText = file_get_contents('vendor/toproplus/laravel-admin-ext-uibox/md/MarkdownBox.md');
$theme = 'okaidia';
$data = new MarkdownBox($mdText, $theme);
$column->append($data->render());
});