39 lines
985 B
PHP
39 lines
985 B
PHP
<?php
|
|
|
|
namespace App\Nova\Dashboards;
|
|
|
|
use App\Nova\Resources\Order\Loan\Metrics\LoanOrderPerDay;
|
|
use App\Nova\Resources\Order\Loan\Metrics\LoanOrderPerStatus;
|
|
use App\Nova\Resources\Order\Loan\Metrics\NewLoanOrders;
|
|
use Illuminate\Support\Facades\Gate;
|
|
use Laravel\Nova\Dashboards\Main as Dashboard;
|
|
|
|
class Main extends Dashboard
|
|
{
|
|
/**
|
|
* Get the displayable name of the dashboard.
|
|
*/
|
|
public function name(): string
|
|
{
|
|
return __('Dashboard');
|
|
}
|
|
|
|
/**
|
|
* Get the cards for the dashboard.
|
|
*/
|
|
public function cards(): array
|
|
{
|
|
return [
|
|
NewLoanOrders::make()
|
|
->canSee(fn () => Gate::allows('isAdmin', auth()->user()->isAdmin())),
|
|
|
|
LoanOrderPerDay::make()
|
|
->canSee(fn () => Gate::allows('isAdmin', auth()->user()->isAdmin())),
|
|
|
|
LoanOrderPerStatus::make()
|
|
->canSee(fn () => Gate::allows('isAdmin', auth()->user()->isAdmin())),
|
|
|
|
];
|
|
}
|
|
}
|