Merge pull request #1942 from EnesSacid-Buker/master
Currencies widget added
This commit is contained in:
@ -22,6 +22,7 @@ class Widgets
|
||||
'App\Widgets\AccountBalance',
|
||||
'App\Widgets\LatestIncome',
|
||||
'App\Widgets\LatestExpenses',
|
||||
'App\Widgets\Currencies',
|
||||
];
|
||||
|
||||
Module::enabled()->each(function ($module) use (&$list) {
|
||||
|
21
app/Widgets/Currencies.php
Normal file
21
app/Widgets/Currencies.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?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()
|
||||
{
|
||||
$currencies = Currency::enabled()->take(5)->get();
|
||||
|
||||
return $this->view('widgets.currencies', [
|
||||
'currencies' => $currencies,
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user