feat(contacts): fresh portal dashboard and profile controllers

This commit is contained in:
Darko Gjorgjijoski
2026-08-20 21:51:21 +02:00
parent f220185a40
commit 3f5238bc43
2 changed files with 80 additions and 0 deletions
@@ -0,0 +1,28 @@
<?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())
);
}
}