@extends('layouts.app', [ 'navClass' => 'navbar-light bg-secondary', 'parentSection' => 'laravel', 'elementName' => 'client-management' ]) @section('title', 'Viagens |') @section('content') @component('layouts.headers.auth') @component('layouts.headers.breadcrumbs') @slot('title') Viagens @endslot @endcomponent @endcomponent

Lista de Viagens

Abaixo você encontra os Viagens cadastradas no TravelTogether

@include('alerts.success') @include('alerts.errors')
{{-- Filters --}}

Filtros

@csrf {{-- 1 --}}
{{-- 2 --}}
{{-- 3 --}}
{{-- 4 --}}
{{-- 5 --}}
{{-- 6 --}}



@php $total = 0; @endphp @foreach ($trips as $key => $trip) @php $total += $value->where('trip_id', '=', $trip->id)->sum('final_price'); @endphp @endforeach
ID Cliente Nome Início Fim Vendas Vinculadas Valor Total Ações
{{ $trip->first_name ." ".$trip->last_name }} {{ $trip->title }} {{ date('d/m/Y', strtotime($trip->start_date)) }} {{ date('d/m/Y', strtotime($trip->end_date)) }} {{ $trip_sale->where('trip_id', '=', $trip->id)->count() }} @if ( $trip_sale->where('trip_id', '=', $trip->id)->count() != 0) R$ {{ number_format($value->where('trip_id', '=', $trip->id)->sum('final_price'), 2, ",", ".") }} @else R$ 0,00 @endif
@include('layouts.footers.auth')
@endsection @push('css') @endpush @push('js') @endpush