@extends('layouts.app') @section('content')

Lista cu contracte

@if($errors->any()) @foreach($errors->all() as $error) @if($loop->first)
@endif @endforeach @endif @if(session('success'))
@endif @if(session('error'))
@endif
Lista contracte
@foreach($contracts as $contract) @php $status = 'Suspendat'; if($contract->status) { $status = 'Activ'; } $branch_name = App\Models\Branch::where('branch',$contract->branch_id)->first(); @endphp @endforeach
#ID Numar Proprietar Agentie Data De start Valabilitate Status Optiuni
#{{$contract->id}} {{$contract->number}} {{$contract->supplier->name}} @if($branch_name){{$branch_name->name}}@endif {{Carbon\Carbon::parse($contract->start_date)->format('d-m-Y')}} {{Carbon\Carbon::parse($contract->end_date)->format('d-m-Y')}} {{$status}}
@endsection @push('js') @endpush