Open yunlongw opened 5 years ago
我在路由中定义了一个 options 的路由 ,在打开 api-test 模块后报错 Undefined index: OPTIONS
vendor/laravel-admin-ext/api-tester/src/ApiTester.php
public static $methodColors = [ 'GET' => 'green', 'HEAD' => 'gray', 'POST' => 'blue', 'PUT' => 'yellow', 'DELETE' => 'red', 'PATCH' => 'aqua', ];
vendor/laravel-admin-ext/api-tester/resources/views/index.blade.php
@foreach($routes as $route) @php ($color = Encore\Admin\ApiTester\ApiTester::$methodColors[$route['method']]) <li class="route-item" data-uri="{{ $route['uri'] }}" data-method="{{ $route['method'] }}" data-method-color="{{$color}}" data-parameters='{!! $route['parameters'] !!}' > <a href="#"><b>{{ $route['uri'] }}</b> <div class="pull-right"> <span class="label bg-{{ $color }}">{{ $route['method'] }}</span> </div> </a> </li> @endforeach
我在路由中定义了一个 options 的路由 ,在打开 api-test 模块后报错 Undefined index: OPTIONS
vendor/laravel-admin-ext/api-tester/src/ApiTester.php
vendor/laravel-admin-ext/api-tester/resources/views/index.blade.php