@foreach($users as $key=> $row) @if (auth()->user()->role == 'super_admin' && $row->role == 'super_admin' && auth()->user()->id != 1 && auth()->user()->id != $row->id) @continue @endif @if ($row->role == 'sub_admin') @if (auth()->user()->id != $row->id)
@endif @endif {{ $row->name }} {{ $row->email }} {{ __('users.'.$row->role) }} {{ \Carbon\Carbon::parse($row->created_at)->format('Y/m/d') }} @if($row->role == 'super_admin' && $row->id == 1) {{ __('dashboard.edit') }} @else @if($row->deleted_at) @if($row->role == 'sub_admin' || (auth()->user()->role == 'super_admin' && $row->role == 'super_admin' && $row->id != 1)) {{ __('dashboard.restore') }} @if (auth()->user()->id != $row->id) {{ __('dashboard.delete') }} @endif @endif @else {{ __('dashboard.edit') }} @if($row->role == 'sub_admin' || (auth()->user()->role == 'super_admin' && $row->role == 'super_admin' && $row->id != 1)) @if (auth()->user()->id != $row->id) {{ __('dashboard.trash') }} @endif @endif @endif @endif @endforeach @if( count( $users ) && $users->hasPages() ) {{ $users->links() }} @endif