@extends('main') @section('title', 'Customers | Page') @section('content')
entries
@foreach ($users as $user) @endforeach
User name Phone email Role Created On Status Action
{{ $user->name }} {{ $user->phone }} {{ $user->email }} @if ($user->roles->isNotEmpty()) {{ $user->roles->pluck('name')->join(', ') }} @else No Role @endif {{ $user->created_at }} @if ($user->status === 'pending') {{ $user->status }} @elseif ($user->status === 'active') {{ $user->status }} @elseif ($user->status === 'no-active') {{ $user->status }} @else {{ $user->status }} {{-- Warna default jika status lain --}} @endif
{{-- Edit Button --}} @php $editRoute = $type === 'customer' ? route('customer.form', ['id' => $user->id]) : route('user.form', ['id' => $user->id]); @endphp Edit {{-- Delete Button --}} Delete {{-- Hidden Delete Form --}} {{-- Reset Password Button --}}
@csrf
Showing {{ $users->firstItem() }} to {{ $users->lastItem() }} of {{ $totalData }} entries
@if (session('success')) @push('scripts') @endpush @endif @push('scripts') @endpush @endsection