@extends('admin.layout') @section('title') Gestion Chantiers @endsection @section('content')

Gestion des Chantiers


@foreach($chantiers as $chantier) @endforeach
Nom Adresse Date de debut Date de fin Date fin Réelle Enquête Action
@if($chantier->photo && !empty($chantier->photo) && isset($chantier->photo[0]) && file_exists(public_path('uploads/' . $chantier->photo[0]))) Photo @else No Image @endif
{{ $chantier->nom ?? '' }}
@php $nb_taches = \App\Models\Tache::where('chantier_id',$chantier->id)->count();; @endphp
{{ $nb_taches ?? 0 }} taches
{{ $chantier->adresse ?? '' }} {{ $chantier->date_de_debut ?? '' }} {{ $chantier->date_de_fin ?? '' }} {{ $chantier->date_fin_reelle ?? 'N/A' }} @if(empty($chantier->date_fin_reelle)) Pas de date @else @php $difference = $chantier->nbjours - $chantier->nbjours_reelle; @endphp @if($difference < 0) {{ $difference ?? '' }} jours de retard @else {{ $difference ?? '' }} jours en avance @endif @endif Details Modifier Supprimer
@endsection @section('script') @endsection