Eshop-Laravel/resources/views/user/customer-orders.blade.php
2019-10-18 12:25:37 +03:00

83 lines
3.2 KiB
PHP

@php
$menu = App\Menu::all()->toArray();
@endphp
@extends('master')
@section('main_content')
<section class="hero hero-page gray-bg padding-small">
<div class="container">
<div class="row d-flex">
<div class="col-lg-9 order-2 order-lg-1">
<h1>Your orders</h1><p class="lead">Your orders in one place.</p>
</div>
<div class="col-lg-3 text-right order-1 order-lg-2">
<ul class="breadcrumb justify-content-lg-end">
<li class="breadcrumb-item"><a href="{{url('/')}}">Home</a></li>
<li class="breadcrumb-item active">Orders</li>
</ul>
</div>
</div>
</div>
</section>
<section class="padding-small">
<div class="container">
<div class="row">
<!-- Customer Sidebar-->
<div class="customer-sidebar col-xl-3 col-lg-4 mb-md-5">
<div class="customer-profile">
<a href="#" class="d-inline-block">
<img src="{{asset('images/profilePics').'/'.$user[0]->{'profilepic'} }}" class="img-fluid rounded-circle customer-image"></a>
<h5>{{$user[0]->{'name'} }}</h5>
<p class="text-muted text-small">{{ $user[0]->{'street'} . ','. $user[0]->{'streetNum'} }}
<br>
{{$user[0]->{'city'} }}
<br>
{{$user[0]->{'country'} }} <br>ZIP : {{$user[0]->{'ZIP'} }} </p>
</div>
<nav class="list-group customer-nav">
<a href="{{url('user/customer-orders')}}" class="active list-group-item d-flex justify-content-between align-items-center">
<span>
<span class="icon icon-bag"></span>Orders</span>
<small class="badge badge-pill badge-light">{{count($user_orders)}}</small></a>
<a href="{{url('user/profile')}}" class="list-group-item d-flex justify-content-between align-items-center">
<span>
<span class="icon icon-profile">
</span>Profile</span>
</a>
<a href="{{url('user/logout')}}" class="list-group-item d-flex justify-content-between align-items-center"><span><span class="fa fa-sign-out">
</span>Log out</span></a>
</nav>
</div>
<div class="col-lg-8 col-xl-9 pl-lg-3">
<table class="table table-hover table-responsive-md">
<thead>
<tr>
<th>Order</th>
<th>Date</th>
<th>Total</th>
{{-- <th>Status</th> --}}
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach ($user_orders as $order)
<tr>
<th># {{$order->orderid}}</th>
<td>{{$order->created_at}}</td>
<td>{{$order->total}}</td>
<td><a href="{{url('user/order').'/' . $order->orderid}}" class="btn btn-primary btn-sm">View</a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</section>
@endsection