HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers95/rentman.io/resources/views/site/components/_compareTable.blade.php
<div class="compare-table  js-compare-table" id="compareTable">
    @include('site.components.heading', ['headingTitle' => ($pricingLabels->compareTableHeading ?? 'Compare packages')])


    <div class="table">
        <div class="option">

            <h4>{{ $pricingLabels->compareOptions ?? 'Options' }}</h4>
            @foreach(config('package.table') as $tableGroupKey => $tableGroupValues)

                <div class="{{$tableGroupKey}}">
                    @if($tableGroupKey != 'options') <p class="label"> {{ $pricingLabels->{camel_case($tableGroupKey)} ?? '$pricingLabels->'.camel_case($tableGroupKey) }} </p> @endif

                    @foreach($tableGroupValues as $tableGroupValue)

                        @if($tableGroupValue == 'restrictions')
                            <p class="two">{{ $pricingLabels->{camel_case($tableGroupValue)} ?? '$pricingLabels->'.camel_case($tableGroupValue) }}</p>

                        @elseif(in_array($tableGroupValue, config('package.dropdownFields')))
                            <p class="toggle">{{ $pricingLabels->{camel_case($tableGroupValue)} ?? '$pricingLabels->'.camel_case($tableGroupValue) }}
                                <span class="description">{{ $pricingLabels->{camel_case($tableGroupValue).'Tooltip'} ?? '$pricingLabels->'.camel_case($tableGroupValue).'Tooltip' }}</span>
                            </p>
                        @else
                            <p>{{ $pricingLabels->{camel_case($tableGroupValue)} ?? '$pricingLabels->'.camel_case($tableGroupValue) }}</p>
                        @endif
                    @endforeach
                </div>

            @endforeach

        </div>

        @foreach($packages as $package)
            <div class="package {{ $package->code_name }}">

                <h4>{{ $package->translation->name }}</h4>
                @foreach(config('package.table') as $tableGroupKey => $tableGroupValues)

                    <div class="{{$tableGroupKey}}">
                        @if($tableGroupKey != 'options') <p class="label"></p> @endif

                        {{-- Loop through the table properties--}}
                        @foreach($tableGroupValues as $tableGroupValue)

                            {{-- Check if value has custom value method --}}
                            @if(in_array($tableGroupValue, config('package.customFields')))

                                @switch($tableGroupValue)

                                    @case('restrictions')
                                        <p class="two  u-text-align-center">
                                            @if(!$package->project_restriction && !$package->user_restriction )
                                                {{ $pricingLabels->noRestriction ?? '$pricingLabels->noRestriction' }}<br>&nbsp;
                                            @else
                                                @if($package->user_restriction){{ $pricingLabels->userRestriction ?? '$pricingLabels->userRestriction' }} <br/><br/>@endif
                                                @if($package->project_restriction){!! $pricingLabels->projectRestriction ?? '$pricingLabels->projectRestriction' !!}@endif
                                            @endif
                                        </p>
                                    @break

                                    @case('storage')
                                        <p>{{ $package->$tableGroupValue }} GB</p>
                                    @break

                                    @case('custom_templates')
                                        <p>@if($package->$tableGroupValue) <span class="check show"></span> @else {{ $pricingLabels->customTemplatesOwnPaper ?? '$pricingLabels->customTemplatesOwnPaper' }}@endif</p>
                                    @break

                                    @case('own_mail_server')
                                        <p>@if(!$package->$tableGroupValue) <span class="check show"></span> @else {{ $pricingLabels->ownMailServerValue ?? '$pricingLabels->ownMailServerValue' }}@endif</p>
                                    @break

                                    @default
                                        <p>{{ $pricingLabels->{camel_case($tableGroupValue) . 'Options' . $package->$tableGroupValue} ?? '$pricingLabels->' . camel_case($tableGroupValue) . 'Options' . $package->$tableGroupValue }}</p>
                                    @break

                                @endswitch

                            @else
                                <p>@if($package->$tableGroupValue) <span class="check show"></span> @else - @endif</p>
                            @endif

                        @endforeach
                    </div>

                @endforeach

            </div>
        @endforeach
    </div>

</div>