@extends('layouts/contentLayoutMaster') @section('title', 'Edit Mockup') @section('main-page', 'Edit Mockup') @section('vendor-style') {{-- Page Css files --}} @endsection @section('page-style') {{-- Page Css files --}} @endsection @php $mediaCollection = $model->getMedia('mockups'); $existingMedia = [ 'front' => [ 'base_image' => $mediaCollection->where('custom_properties.side', 'front')->where('custom_properties.role', 'base')->first()?->getFullUrl(), 'mask_image' => $mediaCollection->where('custom_properties.side', 'front')->where('custom_properties.role', 'mask')->first()?->getFullUrl(), 'shadow_image' => $mediaCollection->where('custom_properties.side', 'front')->where('custom_properties.role', 'shadow')->first()?->getFullUrl(), 'displacement_image' => $mediaCollection->where('custom_properties.side', 'front')->where('custom_properties.role', 'displacement')->first()?->getFullUrl(), 'light_image' => $mediaCollection->where('custom_properties.side', 'front')->where('custom_properties.role', 'light')->first()?->getFullUrl(), ], 'back' => [ 'base_image' => $mediaCollection->where('custom_properties.side', 'back')->where('custom_properties.role', 'base')->first()?->getFullUrl(), 'mask_image' => $mediaCollection->where('custom_properties.side', 'back')->where('custom_properties.role', 'mask')->first()?->getFullUrl(), 'shadow_image' => $mediaCollection->where('custom_properties.side', 'back')->where('custom_properties.role', 'shadow')->first()?->getFullUrl(), 'displacement_image' => $mediaCollection->where('custom_properties.side', 'back')->where('custom_properties.role', 'displacement')->first()?->getFullUrl(), 'light_image' => $mediaCollection->where('custom_properties.side', 'back')->where('custom_properties.role', 'light')->first()?->getFullUrl(), ], 'none' => [ 'base_image' => $mediaCollection->where('custom_properties.side', 'none')->where('custom_properties.role', 'base')->first()?->getFullUrl(), 'mask_image' => $mediaCollection->where('custom_properties.side', 'none')->where('custom_properties.role', 'mask')->first()?->getFullUrl(), 'shadow_image' => $mediaCollection->where('custom_properties.side', 'none')->where('custom_properties.role', 'shadow')->first()?->getFullUrl(), 'displacement_image' => $mediaCollection->where('custom_properties.side', 'none')->where('custom_properties.role', 'displacement')->first()?->getFullUrl(), 'light_image' => $mediaCollection->where('custom_properties.side', 'none')->where('custom_properties.role', 'light')->first()?->getFullUrl(), ], ]; $existingMediaIds = [ 'front' => [ 'base_image' => $mediaCollection->where('custom_properties.side', 'front')->where('custom_properties.role', 'base')->first()?->id, 'mask_image' => $mediaCollection->where('custom_properties.side', 'front')->where('custom_properties.role', 'mask')->first()?->id, 'shadow_image' => $mediaCollection->where('custom_properties.side', 'front')->where('custom_properties.role', 'shadow')->first()?->id, 'displacement_image' => $mediaCollection->where('custom_properties.side', 'front')->where('custom_properties.role', 'displacement')->first()?->id, 'light_image' => $mediaCollection->where('custom_properties.side', 'front')->where('custom_properties.role', 'light')->first()?->id, ], 'back' => [ 'base_image' => $mediaCollection->where('custom_properties.side', 'back')->where('custom_properties.role', 'base')->first()?->id, 'mask_image' => $mediaCollection->where('custom_properties.side', 'back')->where('custom_properties.role', 'mask')->first()?->id, 'shadow_image' => $mediaCollection->where('custom_properties.side', 'back')->where('custom_properties.role', 'shadow')->first()?->id, 'displacement_image' => $mediaCollection->where('custom_properties.side', 'back')->where('custom_properties.role', 'displacement')->first()?->id, 'light_image' => $mediaCollection->where('custom_properties.side', 'back')->where('custom_properties.role', 'light')->first()?->id, ], 'none' => [ 'base_image' => $mediaCollection->where('custom_properties.side', 'none')->where('custom_properties.role', 'base')->first()?->id, 'mask_image' => $mediaCollection->where('custom_properties.side', 'none')->where('custom_properties.role', 'mask')->first()?->id, 'shadow_image' => $mediaCollection->where('custom_properties.side', 'none')->where('custom_properties.role', 'shadow')->first()?->id, 'displacement_image' => $mediaCollection->where('custom_properties.side', 'none')->where('custom_properties.role', 'displacement')->first()?->id, 'light_image' => $mediaCollection->where('custom_properties.side', 'none')->where('custom_properties.role', 'light')->first()?->id, ], ]; $existingWarpPoints = [ 'front' => $model->sideSettings->firstWhere('side', 'front')?->warp_points ?? null, 'back' => $model->sideSettings->firstWhere('side', 'back')?->warp_points ?? null, 'none' => $model->sideSettings->firstWhere('side', 'none')?->warp_points ?? null, ]; @endphp @section('content')
@csrf @method('PUT') {{-- --}}
@include("modals.templates.template-modal")
@endsection @section('vendor-script') {{-- Vendor js files --}} @endsection @section('page-script') @endsection