@php $module_array = explode(',', $current_user_role_info->modules_permission); //print_r($module_array); $value_create = $formdata->id . '-create'; $value_view = $formdata->id . '-view'; $value_edit = $formdata->id . '-edit'; $value_delete = $formdata->id . '-delete'; $value_serialize = $formdata->id . '-serialize'; $value_column_visibility = $formdata->id . '-column visibility'; $value_seo_tags = $formdata->id . '-seotags'; $value_bulkdataimport = $formdata->id . '-bulkdataimport'; $value_bulkmediaimport = $formdata->id . '-bulkmediaimport'; $value_mediafiles = $formdata->id . '-mediafiles'; $value_export = $formdata->id . '-export'; $finalize_module_array = []; foreach ($module_array as $getmodule) { if ( $getmodule == $value_view or $getmodule == $value_create or $getmodule == $value_edit or $getmodule == $value_delete or $getmodule == $value_serialize or $getmodule == $value_seo_tags or $getmodule == $value_bulkdataimport or $getmodule == $value_bulkmediaimport or $getmodule == $value_mediafiles or $getmodule == $value_export or $getmodule == $value_column_visibility ) { array_push($finalize_module_array, $getmodule); } } //print_r($finalize_module_array); $index_val = $finalize_module_array[0]; @endphp
@if (in_array($value_view, $module_array))
@if (count($visible_module_collection) > 0) @php $recid = ''; $field_array = []; $image_array = ['jpg', 'JPG', 'png', 'PNG', 'jpeg', 'JPEG', 'webp','svg',]; $file_array = ['pdf', 'doc', 'docx', 'xls', 'xlsx', 'html']; $date_array = ['created_at', 'updated_at']; $relation_array = []; @endphp @foreach ($visible_module_collection as $key => $visible_collection) @php $field_name = $visible_collection->field_name; $field_set = Str::lower($field_name); $set_for_field = str_replace(' ', '_', $field_set); array_push($field_array, $set_for_field); if ($visible_collection->field_name == 'serialize_automatic') { $visible_collection->field_name = 'Order Level'; } if ($visible_collection->type == 'one_to_one_relations') { array_push($relation_array, $set_for_field); } @endphp @endforeach @if (in_array($value_edit, $module_array) or in_array($value_delete, $module_array) or in_array($value_seo_tags, $module_array)) @endif @foreach ($all_records as $key => $record) @foreach ($table_fields as $field_key => $field) @php if ($field == 'id') { $recid = $record[$field]; } @endphp @if (in_array($field, $field_array)) @php $ext = pathinfo($record[$field], PATHINFO_EXTENSION); @endphp @if (in_array($ext, $image_array)) @php $exploded_imgs = explode( ',', $record[$field], ); @endphp @else @php $exploded_files = explode( ',', $record[$field], ); @endphp @else @if (in_array($field, $date_array)) @php $formate_create_date = date( 'd M, Y | h:i A', strtotime($record[$field]), ); @endphp @else @if (in_array($field, $relation_array)) @php $getmodule_collection = \App\Models\ModuleCollection::where( 'form_id', $formdata->id, ) ->where('type', 'one_to_one_relations') ->where('field_name', $field) ->first(); $getmodule_relation = \App\Models\ModuleRelation::where( 'form_id', $formdata->id, ) ->where( 'field_id', $getmodule_collection->field_count, ) ->first(); $get_relation_data = DB::table( $getmodule_relation->related_table, ) ->where('id', $record[$field]) ->pluck( $getmodule_relation->related_table_field_to_display, ) ->first(); //echo $get_relation_data->title; @endphp @else @endif @endif @endif @endif @endif @endforeach @if (in_array($value_edit, $module_array) or in_array($value_delete, $module_array) or in_array($value_seo_tags, $module_array)) @endif @endforeach
#{{ $visible_collection->field_name }}Action
{{ $key + 1 }} @foreach($exploded_imgs as $img) {{ $img }} @endforeach @foreach($exploded_files as $file) View File @endforeach {{ $formate_create_date }} {{ $get_relation_data }} {{ $record[$field] }} @if (in_array($value_seo_tags, $module_array)) @if ($formdata->seo_enabled == 1) @php $seo_tags = \App\Models\SeoSetting::where( 'module_dataid', $recid, ) ->where('module_slug', $moduletable) ->first(); @endphp @if ($seo_tags) @endif @endif @endif @if (in_array($value_edit, $module_array)) @endif @if (in_array($value_delete, $module_array)) @endif
@else

Nothing found

@endif
@endif @if (in_array($value_serialize, $module_array))
@if (count($visible_module_collection) > 0) @php $recid = ''; $field_array = []; $image_array = ['jpg', 'JPG', 'png', 'PNG', 'jpeg', 'JPEG', 'webp']; $file_array = ['pdf', 'doc', 'docx', 'xls', 'xlsx', 'html']; $date_array = ['created_at', 'updated_at']; $relation_array = []; @endphp @foreach ($visible_module_collection as $key => $visible_collection) @php $field_name = $visible_collection->field_name; $field_set = Str::lower($field_name); $set_for_field = str_replace(' ', '_', $field_set); array_push($field_array, $set_for_field); // if ($visible_collection->field_name == 'serialize_automatic') { // $visible_collection->field_name = 'Order Level'; // } if ($visible_collection->type == 'one_to_one_relations') { array_push($relation_array, $set_for_field); } //echo $visible_collection->field_name; @endphp @if ($visible_collection->field_name != 'Order Level') @endif @endforeach @foreach ($serialize_all_records as $key => $record) @foreach ($table_fields as $field_key => $field) @php //print_r($field_array); if ($field == 'id') { $recid = $record[$field]; } @endphp @if (in_array($field, $field_array)) @php $ext = pathinfo($record[$field], PATHINFO_EXTENSION); @endphp @if (in_array($ext, $image_array)) @php $exploded_imgs = explode( ',', $record[$field], ); @endphp @else @if (in_array($ext, $file_array)) @php $exploded_files = explode( ',', $record[$field], ); @endphp @else @if (in_array($field, $date_array)) @php $formate_create_date = date( 'd M, Y | h:i A', strtotime($record[$field]), ); @endphp @else @if (in_array($field, $relation_array)) @php $getmodule_collection = \App\Models\ModuleCollection::where( 'form_id', $formdata->id, ) ->where('type', 'one_to_one_relations') ->where('field_name', $field) ->first(); $getmodule_relation = \App\Models\ModuleRelation::where( 'form_id', $formdata->id, ) ->where( 'field_id', $getmodule_collection->field_count, ) ->first(); $get_relation_data = DB::table( $getmodule_relation->related_table, ) ->where('id', $record[$field]) ->pluck( $getmodule_relation->related_table_field_to_display, ) ->first(); //echo $get_relation_data->title; @endphp @else @endif @endif @endif @endif @endif @endforeach @endforeach
#{{ $visible_collection->field_name }}
@foreach($exploded_imgs as $img) {{ $img }} @endforeach @foreach($exploded_files as $file) View File @endforeach {{ $formate_create_date }} {{ $get_relation_data }} {{ $record[$field] }}
@else

Nothing found

@endif
@endif @if (in_array($value_create, $module_array))
@csrf @foreach ($form_fields_data as $key => $form_fields) @php $check_form_field_array = [ 'serialize_automatic', 'Created At', 'Updated At', ]; @endphp @if (!in_array($form_fields->field_name, $check_form_field_array)) @php $label_for = Str::lower($form_fields->field_name); $replace_label_for = str_replace(' ', '', $label_for); $field_name = Str::lower($form_fields->field_name); $replace_field_name = str_replace(' ', '_', $field_name); //============================================= if ($form_fields->pattern != '') { if ($form_fields->pattern != 'multiple') { $setarray = ''; $setpattern = 'pattern = "' . $form_fields->pattern . '"'; } else { $setpattern = $form_fields->pattern; $setarray = '[]'; } } else { $setarray = ''; $setpattern = ''; } @endphp
@if ($formdata->label_status != 0) @endif {{-- ================== For Text Type Fieldsets =============== --}} @if ( $form_fields->type == 'text' || $form_fields->type == 'number' || $form_fields->type == 'email' || $form_fields->type == 'password') validation }} style="{{ $form_fields->custom_style }}" /> @endif {{-- ================== For Date Time Picker Type Fieldsets =============== --}} @if ($form_fields->type == 'datetimepicker') validation }} style="{{ $form_fields->custom_style }}" /> @endif {{-- ================== For Date Picker Type Fieldsets =============== --}} @if ($form_fields->type == 'datepicker') validation }} style="{{ $form_fields->custom_style }}" /> @endif {{-- ================== For Date Picker Type Fieldsets =============== --}} @if ($form_fields->type == 'imepicker') validation }} style="{{ $form_fields->custom_style }}" /> @endif {{-- ================== For Color Picker Type Fieldsets =============== --}} @if ($form_fields->type == 'colorpicker') validation }} style="{{ $form_fields->custom_style }}" /> @endif {{-- ================== For Textarea Type Fieldsets =============== --}} @if ($form_fields->type == 'textarea') @endif {{-- ================== For Textarea Editor Type Fieldsets =============== --}} @if ($form_fields->type == 'textarea-editor') @endif {{-- ================== For File Type Fieldsets =============== --}} @if ($form_fields->type == 'file') validation }} style="{{ $form_fields->custom_style }}" /> @endif {{-- ================== For Dropdown Type Fieldsets =============== --}} @if ($form_fields->type == 'dropdown') @php $form_fields_options = \App\Models\ModuleOption::where( 'form_id', $formdata->id, ) ->where('field_id', $form_fields->field_count) ->get(); @endphp @endif {{-- ================== For ONE TO ONE RELATION Type Fieldsets =============== --}} @if ($form_fields->type == 'one_to_one_relations') @php $form_fields_relation = \App\Models\ModuleRelation::where( 'form_id', $formdata->id, ) ->where('field_id', $form_fields->field_count) ->first(); $get_model_name = \App\Models\CoreModule::firstWhere( 'module_table', $form_fields_relation->related_table, ); $model_name = '\\App\\Models\\' . $get_model_name->module_model; $get_one_to_one_data = $model_name::all(); @endphp @endif {{-- ================== For Checkbos Type Fieldsets =============== --}} @if ($form_fields->type == 'checkbox') @php $form_fields_options = \App\Models\ModuleOption::where( 'form_id', $formdata->id, ) ->where('field_id', $form_fields->field_count) ->get(); @endphp @foreach ($form_fields_options as $fields_options)
@endforeach @endif {{-- ================== For Radio Type Fieldsets =============== --}} @if ($form_fields->type == 'radio') @php $form_fields_options = \App\Models\ModuleOption::where( 'form_id', $formdata->id, ) ->where('field_id', $form_fields->field_count) ->get(); @endphp @foreach ($form_fields_options as $fields_options)
@endforeach @endif
@endif @endforeach
@endif @if (in_array($value_bulkdataimport, $module_array) or in_array($value_bulkmediaimport, $module_array))
@if (in_array($value_bulkdataimport, $module_array))
{{ Str::singular($formdata->module_title) }} Bulk Import
@endif
@if (in_array($value_bulkdataimport, $module_array))

@csrf

---------- Instructions ----------

Instuction
Instuction

@if (count($visible_module_collection) > 0) @foreach ($full_module_collection as $key => $visible_collection) @php $field_name = $visible_collection->field_name; $field_set = Str::lower($field_name); $set_for_field = str_replace( ' ', '_', $field_set, ); @endphp @if ($field_name != 'serialize_automatic' and $field_name != 'Created At' and $field_name != 'Updated At') @endif @endforeach @foreach ($table_fields as $field_key => $field) @if ($field != 'serialize_automatic' and $field != 'created_at' and $field != 'updated_at') @if ($field_key > 0) @endif @endif @endforeach
{{ $visible_collection->field_name }}
-
@endif
@endif @if (in_array($value_bulkmediaimport, $module_array)) @if (count($form_media_fields_data) > 0)

@csrf @foreach ($form_media_fields_data as $key => $form_fields) @php $label_for = Str::lower($form_fields->field_name); $replace_label_for = str_replace(' ', '', $label_for); $field_name = Str::lower($form_fields->field_name); $replace_field_name = str_replace( ' ', '_', $field_name, ); @endphp
@if ($formdata->label_status != 0) @endif validation }} style="{{ $form_fields->custom_style }}" />
@endforeach
@endif @endif
@endif @if (in_array($value_mediafiles, $module_array)) @if (count($form_media_fields_data) > 0)
{{ Str::singular($formdata->module_title) }} Media Files
@foreach ($form_media_fields_data as $key => $media_files) @php $field_name = Str::lower($media_files->field_name); $replace_field_name = str_replace(' ', '_', $field_name); @endphp
0) style="border-top: solid 1px #dfdfdf;" @endif>

@php $mediaPath = 'uploads/' . $formdata->module_model . '/' . $media_files->field_name . '/'; $filesInFolder = File::allFiles($mediaPath); $allMedia = []; foreach ($filesInFolder as $path) { $files = pathinfo($path); $allMedia[] = $files['basename']; } @endphp
@foreach ($allMedia as $key => $mediafile) @php $modelname = $formdata->module_model; $model_name = '\\App\\Models\\' . $modelname; $getmedia_count = $model_name ::where($replace_field_name, $mediafile) ->count(); $imagePath = public_path($mediaPath . $mediafile); // Get the size of the image file $fileSize = filesize($imagePath); $getfilepath = $baseurl . '/' . $mediaPath . $mediafile; @endphp

{{ formatBytes($fileSize) }} {{ $mediafile }}

@endforeach
@endforeach
@endif @endif @if (in_array($value_column_visibility, $module_array))
@if (count($module_collection) > 0) @foreach ($module_collection as $key => $collection) @php if ($collection->field_name == 'serialize_automatic') { $collection->field_name = 'Order Level'; } @endphp @endforeach @else @endif
# Field Name Field Type Visibility Status
{{ $key + 1 }} {{ $collection->field_name }} {{ $collection->type }}

Nothing found

@endif