@extends('layouts.app')
@section('title', 'User Activities')

@section('content')
<style>
.badge
{font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    font-family: "IBM Plex Sans", sans-serif;
    line-height: 1.5;
  margin-top:5px;}
  </style>
<!-- Main content -->
        <section class="content">

      <div class="row">

       
        
        <div class="col-12">
          <div class="box">
           <div class="box-body">           
                      
              <h4 class="box-title text-info mb-0"><i class="fa fa-user fa-sx"></i> User Activities</h4>
             
         <hr class="my-15">
              <div class="table-responsive">
                <table id="tickets" class="table mt-0 table-hover no-wrap" data-page-size="10">
                  <thead>
                    <tr>
                                    <th>#</th>
                                    <!-- <th>User </th> -->
                                    <th>IP</th> 
                                    <th>City</th>
                                    <th>State</th>
                                    <th>Country</th>
                                    <th>Browser</th>
                                    <th>Device</th>
                                    <th>Platform</th>                                   
                                    <th>User Agent</th>

                            </tr>
                  </thead>
                  <tbody>
                  @foreach($activities as $key => $activity)
                                <tr>
                                  <th scope="row">{{$key+1}}</th>
                                  <!-- <td>{{$activity->user_id}}</td> -->
                                <td>{{ $activity->ip ?? 'NA' }}</td>
                                <td>{{ $activity->city ?? 'NA' }}</td>
                                <td>{{ $activity->state ?? 'NA' }}</td>
                                <td>{{ $activity->country ?? 'NA' }}</td>
                                <td>{{ ($activity->browser ?? 0) ? $activity->device : 'NA' }}</td>
                                <td>{{ ($activity->device ?? 0) ? $activity->device : 'NA' }}</td>
                                <td>{{ ($activity->platform ?? 0) ? $activity->platform : 'NA' }}</td>
                                <td>{{ ($activity->user_agent ?? 0) ? $activity->user_agent : 'NA' }}</td>


                
                           

                             
                                </tr>

  
                            @endforeach
                         
                  </tbody>
                </table>
              </div>
            </div>
          </div>
        </div>
     
  
      </div>
      <!-- /.row -->

    </section>
        <!-- /.content -->



@endsection
