[新增] first commit

This commit is contained in:
2021-01-31 11:50:56 +08:00
commit 5500f2ad74
510 changed files with 43315 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Admin\Renderable\Activity;
use App\Models\Activity;
use Encore\Admin\Widgets\Table;
use Illuminate\Contracts\Support\Renderable;
class Grants implements Renderable
{
public function render($key = null)
{
$activity = Activity::find($key);
$items = $activity->grants->map(function ($info) {
return [
'id' => $info->id,
'nickname' => $info->user_nickname,
];
});
dd($items->toArray());
return new Table(['Id', '渠道'], $items->toArray());
}
}