@extends('layouts.app', ['title' => __('Customers')]) @section('admin_title') {{ __('Customers') }} @endsection @section('content')
| # | {{ __('Restorant Id') }} | {{ __('Restorant Name') }} | {{ __('First Name') }} | {{ __('Last Name') }} | {{ __('Email') }} | {{ __('Phone') }} | {{ __('Address') }} | {{ __('Zip Code') }} | {{ __('City') }} | {{ __('State') }} | {{ __('Created at') }} | {{ __('Status') }} |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $category->restaurants->id }} | {{ $category->restaurants->name }} | @php $parts = explode(' ', $category->name, 2); $first = $parts[0] ?? ''; $last = $parts[1] ?? ''; @endphp{{ $first }} | {{ $last }} | {{ $category->email }} | @if(strlen($category->phone) === 10) ({{ substr($category->phone, 0, 3) }}){{ substr($category->phone, 3, 3) }}-{{ substr($category->phone, 6) }} @else {{ $category->phone }} @endif | {{ $category->address }} | {{ $category->zip_code }} | {{ $category->city }} | @php $states = [ 'Alabama' => 'AL', 'Alaska' => 'AK', 'Arizona' => 'AZ', 'Arkansas' => 'AR', 'California' => 'CA', 'Colorado' => 'CO', 'Connecticut' => 'CT', 'Delaware' => 'DE', 'Florida' => 'FL', 'Georgia' => 'GA', 'Hawaii' => 'HI', 'Idaho' => 'ID', 'Illinois' => 'IL', 'Indiana' => 'IN', 'Iowa' => 'IA', 'Kansas' => 'KS', 'Kentucky' => 'KY', 'Louisiana' => 'LA', 'Maine' => 'ME', 'Maryland' => 'MD', 'Massachusetts' => 'MA', 'Michigan' => 'MI', 'Minnesota' => 'MN', 'Mississippi' => 'MS', 'Missouri' => 'MO', 'Montana' => 'MT', 'Nebraska' => 'NE', 'Nevada' => 'NV', 'New Hampshire' => 'NH', 'New Jersey' => 'NJ', 'New Mexico' => 'NM', 'New York' => 'NY', 'North Carolina' => 'NC', 'North Dakota' => 'ND', 'Ohio' => 'OH', 'Oklahoma' => 'OK', 'Oregon' => 'OR', 'Pennsylvania' => 'PA', 'Rhode Island' => 'RI', 'South Carolina' => 'SC', 'South Dakota' => 'SD', 'Tennessee' => 'TN', 'Texas' => 'TX', 'Utah' => 'UT', 'Vermont' => 'VT', 'Virginia' => 'VA', 'Washington' => 'WA', 'West Virginia' => 'WV', 'Wisconsin' => 'WI', 'Wyoming' => 'WY', ]; @endphp{{ $states[$category->state] ?? $category->state }} | {{ $category->created_at->format('Y-m-d H:i') }} | @if($category->is_active == 1) {{ __('Active') }} @else {{ __('Not active') }} @endif |
| # | {{ __('First Name') }} | {{ __('Last Name') }} | {{ __('Email') }} | {{ __('Phone') }} | {{ __('Address') }} | {{ __('City') }} | {{ __('State') }} | {{ __('Zip Code') }} | {{ __('Created at') }} | {{ __('Status') }} |
|---|---|---|---|---|---|---|---|---|---|---|
| @php $parts = explode(' ', $category->name, 2); $first = $parts[0] ?? ''; $last = $parts[1] ?? ''; @endphp | {{ $first }} | {{ $last }} | {{ $category->email }} | @if(strlen($category->phone) === 10) ({{ substr($category->phone, 0, 3) }}){{ substr($category->phone, 3, 3) }}-{{ substr($category->phone, 6) }} @else {{ $category->phone }} @endif | {{ $category->address }} | {{ $category->city }} | @php $states = [ 'Alabama' => 'AL', 'Alaska' => 'AK', 'Arizona' => 'AZ', 'Arkansas' => 'AR', 'California' => 'CA', 'Colorado' => 'CO', 'Connecticut' => 'CT', 'Delaware' => 'DE', 'Florida' => 'FL', 'Georgia' => 'GA', 'Hawaii' => 'HI', 'Idaho' => 'ID', 'Illinois' => 'IL', 'Indiana' => 'IN', 'Iowa' => 'IA', 'Kansas' => 'KS', 'Kentucky' => 'KY', 'Louisiana' => 'LA', 'Maine' => 'ME', 'Maryland' => 'MD', 'Massachusetts' => 'MA', 'Michigan' => 'MI', 'Minnesota' => 'MN', 'Mississippi' => 'MS', 'Missouri' => 'MO', 'Montana' => 'MT', 'Nebraska' => 'NE', 'Nevada' => 'NV', 'New Hampshire' => 'NH', 'New Jersey' => 'NJ', 'New Mexico' => 'NM', 'New York' => 'NY', 'North Carolina' => 'NC', 'North Dakota' => 'ND', 'Ohio' => 'OH', 'Oklahoma' => 'OK', 'Oregon' => 'OR', 'Pennsylvania' => 'PA', 'Rhode Island' => 'RI', 'South Carolina' => 'SC', 'South Dakota' => 'SD', 'Tennessee' => 'TN', 'Texas' => 'TX', 'Utah' => 'UT', 'Vermont' => 'VT', 'Virginia' => 'VA', 'Washington' => 'WA', 'West Virginia' => 'WV', 'Wisconsin' => 'WI', 'Wyoming' => 'WY', ]; @endphp{{ $states[$category->state] ?? $category->state }} | {{ $category->zip_code }} | {{ $category->created_at->format('Y-m-d H:i') }} | @if($category->is_active == 1) {{ __('Active') }} @else {{ __('Not active') }} @endif |