前台部分接口
This commit is contained in:
36
app/Http/Controllers/HomeController.php
Normal file
36
app/Http/Controllers/HomeController.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\BaseApp\BaseController;
|
||||
use App\Service\HomeService;
|
||||
use App\Service\ProjectService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
class HomeController extends BaseController
|
||||
{
|
||||
//
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->service = HomeService::getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* 轮播图列表
|
||||
* @Method GET
|
||||
* @return JsonResponse
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function carousel(): JsonResponse
|
||||
{
|
||||
return jok(
|
||||
$this->service->carousel(),
|
||||
'轮播图列表'
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user