Files
ai-stylegallery/app/Console/Commands/GetPrinterSetting.php

38 lines
919 B
PHP

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class GetPrinterSetting extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'setting:get-printer';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get the raw value of the \'selected_printer\' setting.';
/**
* Execute the console command.
*/
public function handle()
{
$setting = \App\Models\Setting::where('key', 'selected_printer')->first();
if ($setting) {
$this->info('Raw value of \'selected_printer\' setting:');
$this->info(json_encode($setting->value, JSON_PRETTY_PRINT)); // Assuming \'value\' column holds the data
} else {
$this->info('\'selected_printer\' setting not found.');
}
}
}