This commit is contained in:
Dr Masroor Ehsan 2025-01-21 21:43:56 +06:00
parent bd331997f5
commit 690a3babee
3 changed files with 12 additions and 5 deletions

View File

@ -24,7 +24,7 @@ public function popup()
$logs->each(function ($log) {
$log->category_name = Category::from($log->category)->name;
$log->activity_name = Str::of(Activity::from($log->activity)->name)->slug('-')->replace('-', ' ')->title();
$log->activity_name = Str::of(Activity::from($log->activity)->name)->slug('-')->replace('-', ' ')->ucfirst();
if (filled($log->user_agent)) {
$log->browser = "Browser: {$log->browser_name}\nDevice: {$log->device_type}\nPlatform: {$log->platform}";
} else {

View File

@ -6,9 +6,6 @@
return new class extends Migration
{
/**
* Run the migrations
*/
public function up(): void
{
Schema::create('user_agents', static function (Blueprint $table) {

View File

@ -3,6 +3,17 @@
</span>
<table class="table table-sm table-striped">
<thead>
<tr>
<th>Time</th>
<th>User</th>
<th>Activity</th>
<th>Remarks</th>
<th>IP</th>
<th>Browser</th>
<th>Url</th>
</tr>
</thead>
@foreach ($logs as $log)
<tr>
<td>{{ $log->log_time }}</td>
@ -14,7 +25,6 @@
<a target="_blank" href="{{ 'https://ipinfo.io/'.$log->ip_addr }}">{{ $log->ip_addr }}</a>
@endisset
</td>
<td>{{ $log->category_name }}</td>
<td>
@isset($log->browser)
@include('_partials._img-tooltip', ['src' => asset('imgs/browser_64.png'), 'tip' => $log->browser, 'class' => 'msg-icon'])