@extends('layouts.app') @section('content') @if (Auth::user()->role_id >= 5)
@include('sidebar')
@else
@endif

Contratos actuales

{!! Form::open(['method'=>'GET','url'=>'currentcontracts','class'=>'navbar-form navbar-left','role'=>'search']) !!}
{!! Form::close() !!}
@php $markers=array(); foreach ($currentcontracts as $currentcontract) { $markers[] = [ 'title' => $currentcontract->id, 'lat' => $currentcontract->location->getLat(), 'lng' => $currentcontract->location->getLng(), 'popup' => '

' . $currentcontract->id . '

' . $currentcontract->address . '
' . $currentcontract->suppliers->company_name ?? null . '
' . ucfirst($currentcontract->categories->name ?? null) . '
' . $currentcontract->appointment . '
$' . $currentcontract->amount . '
' . ucfirst($currentcontract->status->name) . '
' . $currentcontract->score . ' de 5

', ]; } $markers_json = str_replace(":", " => " ,str_replace("}", "]", str_replace("{", "[", json_encode($markers)))); @endphp @map([ 'lat' => 20.659698, 'lng' => -103.349609, 'zoom' => 12, $markers_json ])
    {{ $currentcontracts->links() }}
@endsection