Add autowire

Add logs command
Improve print jobs handling
Improve installation/documentation
This commit is contained in:
René Preuß committed 2025-07-29 22:16:32 +02:00
1 parent a152074975
commit 621b6cb5c0
17 files changed
+645 -484

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
<?php
namespace App\Commands;
use App\Support\PrinterManager;
use LaravelZero\Framework\Commands\Command;
class Printers extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'printers';
/**
* The console command description.
*
* @var string
*/
protected $description = 'List all printers';
/**
* Execute the console command.
*/
public function handle(PrinterManager $printers): int
{
$printers = $printers->getList();
if ($printers->isEmpty()) {
$this->error('We could not find any printers! Please register them first in CUPS.');
return 1;
}
$this->info('Printer:');
foreach ($printers as $printer) {
$this->info($printer->getName());
}
return 0;
}
}