| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace App\Module\System\AdminLazyRenderable;
- use App\Module\System\Models\AdminUser;
- use Dcat\Admin\Layout\Row;
- use Dcat\Admin\Models\Administrator;
- use Dcat\Admin\Widgets\Table;
- use UCore\DcatAdmin\Support\LazyRenderable;
- class AdminInfo extends LazyRenderable
- {
- public function index($admin_id)
- {
- $content = '';
- $row = new Row();
- $content .= $row->render();
- $admin = AdminUser::query()->find($admin_id);
- $infoArray=[];
- $infoArray['username'] =$admin->username;
- $content .= Table::make($infoArray);
- return view('admin_core.admin_info', [
- 'admin_id' => $admin_id,
- 'content' => $content
- ]);
- }
- public function render()
- {
- $admin_id = $this->admin_id;
- return $this->index($admin_id);
- }
- }
|