akaunting/app/Widgets/AccountBalance.php

25 lines
497 B
PHP
Raw Normal View History

2019-11-16 10:21:14 +03:00
<?php
namespace App\Widgets;
2019-12-29 03:01:19 +03:00
use App\Abstracts\Widget;
2019-11-16 10:21:14 +03:00
use App\Models\Banking\Account;
2019-12-29 03:01:19 +03:00
class AccountBalance extends Widget
2019-11-16 10:21:14 +03:00
{
/**
* Treat this method as a controller action.
* Return view() or other content to display.
*/
public function run()
{
//
$accounts = Account::enabled()->take(5)->get();
return view('widgets.account_balance', [
'config' => (object) $this->config,
'accounts' => $accounts,
]);
}
}