hyperfk8s/app/Repository/Menu/MenuRepository.php

21 lines
433 B
PHP
Executable File

<?php
declare(strict_types=1);
/**
* This file is part of the youyao/admin-api.
*
* (c) youyao <info@nuancebiotech.cn>
* This source file is subject to the license under the project that is bundled.
*/
namespace App\Repository\Menu;
use App\Model\Menu;
class MenuRepository
{
public function getByIds(array $ids)
{
return Menu::query()->whereIn('id', $ids)->orderBy('sort', 'desc')->get()->toArray();
}
}