স্কিপ করে মূল কন্টেন্ট এ যান

উইজেট

Super Admin ড্যাশবোর্ড পেজ এবং কাস্টম ভিউ তৈরির জন্য পুনঃব্যবহারযোগ্য UI কম্পোনেন্ট প্রদান করে।

Box​

use SuperAdmin\Admin\Widgets\Box;

$box = new Box('Title', 'Content goes here');
$box->removable(); // Add close button
$box->collapsable(); // Add collapse button
$box->style('primary'); // primary, info, danger, warning, default

echo $box;

InfoBox​

মেট্রিক কার্ড প্রদর্শন করুন:

use SuperAdmin\Admin\Widgets\InfoBox;

$infoBox = new InfoBox('Orders', 'fa-shopping-cart', 'aqua', '/admin/orders', '150');

// Customize
$infoBox->setID('orders-box')
->link('/admin/orders')
->color('green')
->icon('fa-users')
->info('Total Users');

Tab​

use SuperAdmin\Admin\Widgets\Tab;

$tab = new Tab();
$tab->add('Users', $userTable);
$tab->add('Orders', $orderChart);
$tab->add('Settings', $settingsForm);

Table​

use SuperAdmin\Admin\Widgets\Table;

$headers = ['ID', 'Name', 'Email', 'Created'];
$rows = [
[1, 'John', 'john@example.com', '2024-01-01'],
[2, 'Jane', 'jane@example.com', '2024-01-02'],
];

$table = new Table($headers, $rows);

Collapse​

use SuperAdmin\Admin\Widgets\Collapse;

$collapse = new Collapse();
$collapse->add('Section 1', 'Content for section 1');
$collapse->add('Section 2', 'Content for section 2');
$collapse->add('Section 3', 'Content for section 3');

Alert​

use SuperAdmin\Admin\Widgets\Alert;

$alert = new Alert('This is a warning!', 'Warning');
$alert->style('danger'); // success, info, warning, danger

Callout​

use SuperAdmin\Admin\Widgets\Callout;

$callout = new Callout('Important notice here', 'Notice');
$callout->style('warning');

Form উইজেট​

স্ট্যান্ডঅ্যালোন ফর্ম (কোনো মডেলের সাথে যুক্ত নয়):

use SuperAdmin\Admin\Widgets\Form;

$form = new Form();
$form->action('/admin/settings');
$form->method('POST');

$form->email('email', 'Email');
$form->password('password', 'Password');
$form->text('name', 'Name');
$form->url('website', 'Website');
$form->color('theme', 'Theme Color');
$form->date('birthday', 'Birthday');
$form->textarea('bio', 'Bio');
use SuperAdmin\Admin\Widgets\Carousel;

$carousel = new Carousel([
'/images/slide1.jpg',
'/images/slide2.jpg',
'/images/slide3.jpg',
]);

Content-এ উইজেট ব্যবহার​

use SuperAdmin\Admin\Layout\Content;
use SuperAdmin\Admin\Layout\Row;
use SuperAdmin\Admin\Layout\Column;

public function index(Content $content)
{
return $content
->title('Dashboard')
->row(function (Row $row) {
$row->column(4, new InfoBox('Users', 'fa-users', 'aqua', '/admin/users', '100'));
$row->column(4, new InfoBox('Orders', 'fa-cart', 'green', '/admin/orders', '50'));
$row->column(4, new InfoBox('Revenue', 'fa-dollar', 'red', '/admin/revenue', '$5,000'));
})
->row(function (Row $row) {
$row->column(6, new Box('Recent Users', $userTable));
$row->column(6, new Box('Recent Orders', $orderTable));
});
}

পেজ লেআউট​

সারি ও কলাম দিয়ে কাস্টম লেআউট তৈরি করুন:

$content->row(function (Row $row) {
// Full width
$row->column(12, 'Full width content');
});

$content->row(function (Row $row) {
// Two columns
$row->column(6, 'Left');
$row->column(6, 'Right');
});

$content->row(function (Row $row) {
// Three columns
$row->column(4, 'Col 1');
$row->column(4, 'Col 2');
$row->column(4, 'Col 3');
});

কলামের প্রস্থ নির্ধারণে Bootstrap-এর 12-কলাম গ্রিড সিস্টেম ব্যবহৃত হয়।