123456789101112131415161718192021222324252627282930 |
- <?php
- /*
- * This file is part of the Jiannei/lumen-api-starter.
- *
- * (c) Jiannei <longjian.huang@foxmail.com>
- *
- * This source file is subject to the MIT license that is bundled
- * with this source code in the file LICENSE.
- */
- namespace App\Http\Controllers\Admin\Base;
- use App\Http\Controllers\Controller;
- use Jiannei\Response\Laravel\Support\Facades\Response;
- class CommonController extends Controller
- {
- public function enums()
- {
- $data = trans('enums');
- $enums = [];
- foreach ($data as $key => $val) {
- $k = last(str2arr($key, '\\'));
- $enums[$k] = $val;
- }
- return Response::success($enums);
- }
- }
|