1. Go to this page and download the library: Download lhaamed/blade-bundler 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/ */
lhaamed / blade-bundler example snippets
bash
php artisan optimize
bash
composer du
bash
public static function defaultListMap(listBundle $listBundle ,LengthAwarePaginator|Collection $query): listBundle
{
$items = BB::getQueryItems($query);
$mappedData = array_map(function ($eachRecord) use ( $query) {
$recordModel = $query->find($eachRecord['id']);
$action_links = [];
return [
$recordModel->showName(),
$recordModel->showLastname(),
'actions' => $action_links
];
}, $items);
$listBundle->setTitle('custom title for the list');
$listBundle->setTableHeader([
'name',
'lastname',
'actions',
]);
$listBundle->setTableRecords($mappedData);
return $listBundle;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.