@extends('layouts.app') @php $user = auth()->user(); @endphp @section('content')

INDEX UTILITATI

@if(session('error')) @endif @if($errors->any()) @foreach($errors->all() as $error) @endforeach @endif
@foreach($services as $service) @php $last_index =\App\Models\Utility::where('branch_id',$user->branch_id)->where('status',1)->where('service_id',$service->id)->first(); $created_at = NULL; $consum=0; @endphp @if($last_index) @php $created_at=\Carbon\Carbon::parse($last_index->created_at)->format('Y-m-d'); $consum=$last_index->consum; @endphp @else @endif @endforeach
Serviciu Ultimul Index Ultima Inregistrare Consum Noul Index
{{$service->name}}{{$last_index->index}} {{\Carbon\Carbon::parse($last_index->created_at)->format('d-m-Y')}}0 Lipsa de index{{$consum}} @csrf @if($created_at !== date('Y-m-d'))
@else @endif
@if($user->myRole)

Formular Adaugare:

@csrf
@endif @endsection @push('scripts') @endpush