Eshop-Laravel/resources/views/user/profile.blade.php

153 lines
6.2 KiB
PHP
Raw Permalink Normal View History

2019-10-18 09:25:37 +00:00
@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 profile</h1>
</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">Your profile</li>
</ul>
</div>
</div>
</div>
</section>
@if ($errors -> any() )
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<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="{{url('user/changePic' .'/'. $user[0]->id)}}" class="d-inline-block">
<img src="{{asset('images/profilePics').'/'.$user[0]->{'profilepic'} }}" class="img-fluid rounded-circle customer-image"></a>
<h5>{{Session::get('user_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="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-primary">{{$user_orders}}
</small></a>
<a href="customer-account.html" class="active 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">
<div class="block-header mb-5">
<a href="{{url('user/changePass')}}">
<h5>Change password </h5>
</div></a>
<div class="block-header mb-5">
<h5>Personal details</h5>
</div>
<form method="post" action="" class="content-block">
{{csrf_field()}}
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="firstname" class="form-label">Firstname</label>
<input name="name" value="{{ $user[0]->{'name'} }}" id="firstname" type="text" class="form-control">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="lastname" class="form-label">Lastname</label>
<input name="last_name" value="{{ $user[0]->{'last_name'} }}" id="lastname" type="text" class="form-control">
</div>
</div>
</div>
<!-- /.row-->
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="Street_Number" class="form-label">Street Number</label>
<input name="streetNum" value="{{ $user[0]->{'streetNum'} }}" id="Street_Number" type="text" class="form-control">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="street" class="form-label">Street</label>
<input name="street" value="{{ $user[0]->{'street'} }}" id="street" type="text" class="form-control">
</div>
</div>
</div>
<!-- /.row-->
<div class="row">
<div class="col-sm-6 col-md-3">
<div class="form-group">
<label for="city" class="form-label">City</label>
<input name="city" value="{{ $user[0]->{'city'} }}" id="city" type="text" class="form-control">
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="form-group">
<label for="zip" class="form-label">ZIP</label>
<input name="ZIP" value="{{ $user[0]->{'ZIP'} }}" id="zip" type="text" class="form-control">
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="form-group">
<label for="state" class="form-label">State</label>
<input name="state" value="{{ $user[0]->{'State'} }}" id="state" type="text" class="form-control">
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="form-group">
<label for="country" class="form-label">Country</label>
<input name="country" value="{{ $user[0]->{'country'} }}" id="country" type="text" class="form-control">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="phone" class="form-label">Telephone</label>
<input name="phone" value="{{ $user[0]->{'phone'} }}" id="phone" type="text" class="form-control">
</div>
</div>
<div class="col-sm-12 text-center">
<button name"submit" type="submit" class="btn btn-primary">
<i class="fa fa-save">
Save Changes
</i>
</boutton>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
@endsection