@extends('main') @section('content') @php $company = App\Models\User::where('id', Auth::user()->id)->first(); $customersubscriptionStatus = App\Models\TrnCustomerSubscriptionDetails::where( 'customer_id', Auth::user()->company_id, ) ->latest() ->first(); $companyModules = App\Models\CustomerModule::where('customer_id', $customersubscriptionStatus->customer_id) ->where('status', 1) ->get(); $module = $companyModules; $enabledModules = $module->pluck('code')->toArray(); $companySubModules = App\Models\CustomerSubModule::where( 'customer_id', $customersubscriptionStatus->customer_id, ) ->where('status', 1) ->get(); $subModules = $companySubModules; $enabledSubModules = $subModules->pluck('code')->toArray(); $primary = getPrimaryColor(); // e.g., #206bc4 $r = $g = $b = 0; if (preg_match('/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i', $primary, $matches)) { $r = hexdec($matches[1]); $g = hexdec($matches[2]); $b = hexdec($matches[3]); } @endphp