File: //home/armgroup/libs/resources/views/account/address/index.blade.php
@extends('layouts.app')
@section('content')
<div class="container my-5 body-content">
<div class="row">
<div class="col-lg-3 col-sm-12">
@include('account.sidebar')
</div>
<div class="col-lg-9 col-sm-12">
<div class="card">
<h5 class="card-header">{{ __('Addresses') }}
<span class="float-end">
<a href="{{ route('account.addresses.create') }}" class="btn btn-sm btn-primary">
<span class="fa fa-plus"></span> {{ __('Add') }}
</a>
</span>
</h5>
<div class="card-body">
<table class="table table-sm">
<thead class="thead-dark">
<tr>
<th scope="col">{{ __('Recipient Name') }}</th>
<th scope="col">{{ __('Mobile') }}</th>
<th scope="col">{{ __('City') }}</th>
<th scope="col">{{ __('Address') }}</th>
<th scope="col">{{ __('Actions') }}</th>
</tr>
</thead>
<tbody>
@foreach($addresses as $address)
<tr>
<td>{{ $address->name }}</td>
<td>{{ to_persian_numbers($address->mobile) }}</td>
<td>{{ $address->city->name }}</td>
<td>{{ words($address->address, 10) }}</td>
<td>
<a href="{{ route('account.addresses.edit', $address->id) }}" class="btn btn-info btn-sm">
<span class="fa fa-pencil-alt"></span> {{ __('Edit') }}
</a>
<form method="post" action="{{ route('account.addresses.destroy', $address->id) }}" class="d-inline">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('{{ __('Are you sure?') }}');">
<span class="fa fa-trash"></span> {{ __('Delete') }}
</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection