mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-01 21:00:58 +00:00
29 lines
768 B
PHP
29 lines
768 B
PHP
<?php
|
|
|
|
namespace App\Domains\Contacts\Http\Controllers\CustomerPortal;
|
|
|
|
use App\Domains\Contacts\Contracts\CustomerPortalDashboardProvider;
|
|
use App\Platform\Http\Controller;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Response;
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
class DashboardController extends Controller
|
|
{
|
|
public function __construct(
|
|
private readonly CustomerPortalDashboardProvider $customerPortalDashboardProvider,
|
|
) {}
|
|
|
|
/**
|
|
* Answer with the portal dashboard figures for the signed-in contact.
|
|
*
|
|
* @return Response
|
|
*/
|
|
public function __invoke(Request $request)
|
|
{
|
|
return response()->json(
|
|
$this->customerPortalDashboardProvider->get(Auth::guard('customer')->user())
|
|
);
|
|
}
|
|
}
|