-
packages/Webkul/Admin/src/Traits/Dashboard/Helper.php
Open in GitHubtrait Helper { use DataRetrival; private function setCardsData() { $this->cards = array_map(function ($card) { if (isset($card['label'])) { $card['label'] = trans($card['label']); } return $card; }, config('dashboard_cards')); } // }
-
packages/Webkul/Admin/src/Http/Controllers/Admin/DashboardController.php
Open in GitHubuse Webkul\Lead\Repositories\LeadRepository; use Webkul\Admin\Http\Controllers\Controller; use Webkul\Admin\Traits\Dashboard\Helper as DashboardHelper; class DashboardController extends Controller { use DashboardHelper; private $cards; private $cardData = []; private $leadRepository; public function __construct(LeadRepository $leadRepository) { $this->leadRepository = $leadRepository; $this->setCardsData(); } // }