@extends('layouts.admin') @section('page-title') {{ __('Manage Users logs') }} @endsection @section('breadcrumb') @endsection @section('content')
{{ Form::open(['route' => ['userlogs.index'], 'method' => 'get', 'id' => 'userlogs_filter']) }}
{{ Form::label('month', __('Month'), ['class' => 'form-label']) }} {{ Form::month('month', isset($_GET['month']) ? $_GET['month'] : date('Y-m'), ['class' => 'form-control']) }}
{{ Form::label('users', __('Users'), ['class' => 'form-label']) }} {{ Form::select('user', $usersList, isset($_GET['user']) ? $_GET['user'] : '', ['class' => 'form-control select ', 'id' => 'id']) }}
{{ Form::close() }}
@foreach ($logindetails as $logindetail) @php $details = json_decode($logindetail->details); @endphp @if ($details->status != 'fail') @endif @endforeach
{{ __('User') }} {{ __('Role') }} {{ __('Ip') }} {{ __('Last Login') }} {{ __('Country') }} {{ __('Device Type') }} {{ __('Os') }} {{ __('Action') }}
@php $user = $logindetail->Getuser($logindetail->type, $logindetail->user_id); $name = !empty($user) ? $user->name : ''; $email = !empty($user) ? $user->email : ''; $avatar = !empty($user) ? (!empty($user->avatar) ? \App\Models\Utility::get_file($user->avatar) : asset(Storage::url('uploads/avatar/avatar.png'))) : asset(Storage::url('uploads/avatar/avatar.png')); @endphp
{{ $name }}
{{ $logindetail->type }} {{ $logindetail->ip }} {{ $logindetail->date }} {{ $details->country }} {{ $details->device_type }} {{ $details->os_name }} {{-- @can('delete role') --}}
{!! Form::open([ 'method' => 'DELETE', 'route' => ['userlogs.destroy', $logindetail->id], 'id' => 'delete-form-' . $logindetail->id, ]) !!} {!! Form::close() !!}
{{-- @endcan --}}
@endsection