luck-draw/app/widget/Slide.php

16 lines
270 B
PHP

<?php
namespace app\widget;
use think\facade\View;
use app\model\Slide as WSlide;
class Slide
{
public function index()
{
$data = [
'slides' => WSlide::getList(),
];
return View::assign($data)->fetch('public/slide');
}
}