finished the upgrade to filament 4. completely revamped the frontend with codex, now it looks great!
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Settings\GeneralSettings;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class GetPrinterSetting extends Command
|
||||
@@ -23,15 +24,21 @@ class GetPrinterSetting extends Command
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(GeneralSettings $settings)
|
||||
{
|
||||
$setting = \App\Models\Setting::where('key', 'selected_printer')->first();
|
||||
$value = $settings->selected_printer === '__custom__'
|
||||
? $settings->custom_printer_address
|
||||
: $settings->selected_printer;
|
||||
|
||||
if ($setting) {
|
||||
if ($value) {
|
||||
$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.');
|
||||
$this->info($value);
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
|
||||
$this->info('\'selected_printer\' setting not found.');
|
||||
|
||||
return Command::FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user