misc
This commit is contained in:
parent
b2d8739527
commit
c9e87ef1bb
@ -37,7 +37,7 @@ public function popup()
|
||||
$logs = DB::table('audit_logs')
|
||||
->leftjoin('users', 'users.id', '=', 'audit_logs.user_id')
|
||||
->selectRaw('users.display_name as user_name, audit_logs.*')
|
||||
->orderBy('audit_logs.id')
|
||||
->orderByDesc('audit_logs.id')
|
||||
->where('audit_logs.study_id', $study->id)
|
||||
->get();
|
||||
|
||||
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('user_agents', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('user_agent');
|
||||
$table->string('browser');
|
||||
$table->string('browser_version');
|
||||
$table->string('os');
|
||||
$table->string('os_version');
|
||||
$table->string('device');
|
||||
$table->string('device_type');
|
||||
$table->string('device_brand');
|
||||
$table->string('device_model');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('user_agents');
|
||||
}
|
||||
};
|
@ -1,14 +1,20 @@
|
||||
<table class="table table-sm">
|
||||
<table class="table table-sm table-bordered table-responsive">
|
||||
@foreach ($logs as $log)
|
||||
<tr>
|
||||
<td class="bg-gray-100">{{ $log->created_at }}</td>
|
||||
<td>{{ $log->created_at }}</td>
|
||||
<td>{{ $log->user_name }}</td>
|
||||
<td>{{ $log->category_name }}</td>
|
||||
<td>{{ $log->activity_name }}</td>
|
||||
<td>{{ $log->ip_addr }}</td>
|
||||
<td>{{ Illuminate\Support\Str::limit($log->user_agent, 20) }}</td>
|
||||
<td>{{ $log->notes }}</td>
|
||||
<td>{{ $log->url }}</td>
|
||||
<td>
|
||||
@include('_partials._img-tooltip', ['src' => asset('imgs/browser_64.png'), 'tip' => $log->user_agent, 'class' => 'msg-icon'])
|
||||
</td>
|
||||
<td>
|
||||
@isset($log->url)
|
||||
@include('_partials._img-tooltip', ['src' => asset('imgs/url_64.png'), 'tip' => $log->url, 'class' => 'msg-icon'])
|
||||
@endisset
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user