@if($projects->count() != 0) @foreach($projects as $key=>$project)
@if($project->client()->first() != null) {{$project->client()->first()->name}}@else
@endif
Personal

@foreach($resources as $resource) @if($resource->project_id == $project->id) @if($resource->resource_type == 1) @foreach($employee as $emp) @if($emp->id == $resource->resource_id)
@if($emp->image_url != null) @else @endif {{ $emp->names." ".$emp->surnames}}
{{$emp->employee_id}}
Cargo:
@if($emp->charge()->first() != null){{$emp->charge()->first()->description}}@endif
@php if($emp->tags != null){ $tagsList = explode('_', $emp->tags); foreach($tagsList as $value){ $tag = $tags->where('id', $value)->first(); if($tag != null){ @endphp
@php echo $tag->initial; @endphp
@php } } } @endphp
@if($emp->category()->first() != null){{$emp->category()->first()->name}}@endif
Desde
{{ $resource->start_date->format('d-m-Y') }}
@endif @endforeach @endif @endif @endforeach
Camiones

@foreach($resources as $resource) @if($resource->project_id == $project->id) @if($resource->resource_type == 2) @foreach($fleet as $flt) @if($flt->kind == 1) @if($flt->id == $resource->resource_id)
{{$flt->type}}
{{ $flt->brand." | ".$flt->model }}

{{$flt->plate}}

Seg: {{ $flt->insurance_date }}
Itv: {{ $flt->itv_date }}
T.T: {{ $flt->transit_date }}
Adif: {{ $flt->adif_date }}
Desde: {{ $resource->start_date->format('d-m-Y') }}
@endif @endif @endforeach @endif @endif @endforeach
Maquinaria

@foreach($resources as $resource) @if($resource->project_id == $project->id) @if($resource->resource_type == 2) @foreach($fleet as $flt) @if($flt->kind == 2) @if($flt->id == $resource->resource_id)
{{$flt->type}}
{{ $flt->brand." | ".$flt->model }}

{{$flt->plate}}

Seg: {{ $flt->insurance_date }}
Itv: {{ $flt->itv_date }}
T.T: {{ $flt->transit_date }}
Adif: {{ $flt->adif_date }}
Desde: {{ $resource->start_date->format('d-m-Y') }}
@endif @endif @endforeach @endif @endif @endforeach
Vehiculos

@foreach($resources as $resource) @if($resource->project_id == $project->id) @if($resource->resource_type == 2) @foreach($fleet as $flt) @if($flt->kind == 3) @if($flt->id == $resource->resource_id)
{{$flt->type}}
{{ $flt->brand." | ".$flt->model }}

{{$flt->plate}}

Seg: {{ $flt->insurance_date }}
Itv: {{ $flt->itv_date }}
T.T: {{ $flt->transit_date }}
Adif: {{ $flt->adif_date }}
Desde: {{ $resource->start_date->format('d-m-Y') }}
@endif @endif @endforeach @endif @endif @endforeach
@endforeach @else

No Hay Projectos

@endif