diff --git a/src/Http/Controllers/DashboardController.php b/src/Http/Controllers/DashboardController.php index b2d30b34..b2a1ec4b 100644 --- a/src/Http/Controllers/DashboardController.php +++ b/src/Http/Controllers/DashboardController.php @@ -3,6 +3,7 @@ namespace Cone\Root\Http\Controllers; use Cone\Root\Root; +use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Response as ResponseFactory; @@ -11,10 +12,10 @@ class DashboardController extends Controller /** * Handle the incoming request. */ - public function __invoke(Root $root): Response + public function __invoke(Request $request, Root $root): Response { return ResponseFactory::view('root::dashboard', [ - 'widgets' => $root->widgets->toArray(), + 'widgets' => $root->widgets->map->data($request)->all(), ]); } }