This commit is contained in:
2023-03-08 09:16:04 +08:00
commit e78454540f
1318 changed files with 210569 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace Modules\User\Renderable;
use Encore\Admin\Widgets\Table;
use Illuminate\Contracts\Support\Renderable;
use Modules\User\Models\User;
class UserLog implements Renderable
{
public function render($key = null)
{
$user = User::find($key);
$data = [];
foreach ($user->logs as $log) {
$data[] = [
'admin' => $log->admin->name,
'remark' => $log->remark,
'created_at' => $log->created_at->toDateTimeString(),
];
}
$table = new Table(['操作人', '备注', '添加时间'], $data);
return $table->render();
}
}