停车场管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

100 lines
2.0 KiB

<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\AdminMenu;
use App\Services\ApiResponseService;
use App\Services\AdminMenuService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class MenuController extends Controller
{
/**
* @var ApiResponseService
*/
protected ApiResponseService $responseService;
/**
* @var AdminMenuService
*/
protected AdminMenuService $Service;
/**
* 构造函数
* @param ApiResponseService $responseService
* @param AdminMenuService $Service
*/
public function __construct(
ApiResponseService $responseService,
AdminMenuService $Service,
) {
$this->responseService = $responseService;
$this->Service = $Service;
}
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
try {
return $this->responseService->success([
'items' => $this->Service->getMenuTreeList(),
]);
} catch (\Exception $e) {
$m_prefix = __('exception.get_user_info_list_failed');
return $this->responseService->systemError(
$m_prefix . ':' . $e->getMessage()
);
}
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(string $id)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(string $id)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, string $id)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(string $id)
{
//
}
}