Akaunting/app/Widgets/Currencies.php

28 lines
491 B
PHP
Raw Normal View History

2021-03-18 10:03:13 +00:00
<?php
namespace App\Widgets;
use App\Abstracts\Widget;
use App\Models\Setting\Currency;
class Currencies extends Widget
{
public $default_name = 'widgets.currencies';
public function show()
2026-02-07 18:55:11 +00:00
{
$this->setData();
return $this->view('widgets.currencies', $this->data);
}
public function setData(): void
2021-03-18 10:03:13 +00:00
{
$currencies = Currency::enabled()->take(5)->get();
2026-02-07 18:55:11 +00:00
$this->data = [
2021-03-18 10:03:13 +00:00
'currencies' => $currencies,
2026-02-07 18:55:11 +00:00
];
2021-03-18 10:03:13 +00:00
}
2026-02-07 18:55:11 +00:00
}