@extends('front.layouts.app', ['title' => 'My Orders']) @section('content') @include('front.layouts.app-header')

My Orders

@include('front.my-account.left-sidebar')

My Order

Id

Date

Ship to

Order total

Status

View

@foreach($orders as $order)

{{$order->order_no}}

{{date('d/m/Y', strtotime($order->created_at))}}

{{$order->shippingAddress->street_name }}, {{$order->shippingAddress->city }}, {{$order->shippingAddress->state }}, {{$order->shippingAddress->country }}, {{$order->shippingAddress->zipcode->code }}

{{$order->total}}

@php $orderstatus = ''; $statusname = ''; if (isset($order->orderStatusLast->orderStatus)) { if($order->orderStatusLast->orderStatus->name == 'Accept'){ $orderstatus = 'pending'; } if($order->orderStatusLast->orderStatus->name == 'Shipped'){ $orderstatus = 'shipped'; } if($order->orderStatusLast->orderStatus->name == 'Completed'){ $orderstatus = 'complete'; } if($order->orderStatusLast->orderStatus->name == 'Cancel'){ $orderstatus = 'cancel'; } $statusname = $order->orderStatusLast->orderStatus->name; } @endphp

{{ $statusname }}

@if (isset($order->orderStatusLast->orderStatus) && $order->orderStatusLast->orderStatus->name == 'Shipped' && $order->shipping_method == 2) @endif @if (isset($order->orderStatusLast->orderStatus) && $order->orderStatusLast->orderStatus->name == 'Accept') @endif

@endforeach
@include('front.layouts.app-footer') @endsection @section('custom-js') @endsection