@inject('industry_type_model', 'App\IndustryType') @php $default = []; $default['show_table'] = 1; $default['table_label'] = 'Table'; $default['show_service_staff'] = 1; $default['service_staff_label'] = 'Service staff'; if(!empty($edit_il)){ $default['show_table'] = isset($module_info['tables']['show_table']) ? $module_info['tables']['show_table'] : 0; $default['table_label'] = isset($module_info['tables']['table_label']) ? $module_info['tables']['table_label'] : ''; $default['show_service_staff'] = isset($module_info['service_staff']['show_service_staff']) ? $module_info['service_staff']['show_service_staff'] : 0; $default['service_staff_label'] = isset($module_info['service_staff']['service_staff_label']) ? $module_info['service_staff']['service_staff_label'] : ''; } // get industry type modules $industry_enabled_modules = []; $industry_ids = session('business.industry_type'); foreach($industry_ids as $industry_id) { $industry = $industry_type_model::find($industry_id); $industry_modules = (!empty($industry))? $industry->enabled_modules : []; $industry_enabled_modules = array_merge($industry_enabled_modules, $industry_modules); } @endphp @if(!empty($enabled_modules))