1. Go to this page and download the library: Download manialab/maniaprintlab 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/ */
manialab / maniaprintlab example snippets
// app/Providers/NovaServiceProvider.php
use ManiaLab\ManiaPrintLab\Nova\BadgeDetail;
use ManiaLab\ManiaPrintLab\Nova\PrintingRecord;
use Laravel\Nova\Menu\MenuSection;
use Laravel\Nova\Menu\MenuItem;
Nova::mainMenu(function () {
return [
// … existing sections …
MenuSection::make(('PrintLab'), [
MenuItem::resource(BadgeDetail::class)->name(('Badge Details')),
MenuItem::resource(PrintingRecord::class)->name(('Print Records')),
])->icon('printer')->collapsable(),
];
});
use Laravel\Nova\Fields\Text;
Text::make('Print', function () {
$url = route('maniaprintlab.print', [
$this->token_key,w
$this->id,
]);
return "<a href=\"{$url}\" target=\"_blank\" class=\"btn btn-primary btn-sm\">Print</a>";
})
->onlyOnIndex()
->asHtml()
->help('Click to open the badge print page in a new tab.'),
bash
# 1. Pull in the stable release
composer dor:publish --tag=maniaprintlab-migrations
# 3. Run the migrations (creates configurations, badges_details, and printing tables)
php artisan migrate
# 4. Link storage for file uploads
php artisan storage:link
# 5. Clear & rebuild caches (optional but recommended)
php artisan optimize:clear
bash
php artisan optimize:clear
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.