We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9427f5c + 8d3aee0 commit 446bab2Copy full SHA for 446bab2
src/Routing/Adapter/Laravel.php
@@ -5,8 +5,8 @@
5
use Illuminate\Http\Request;
6
use Illuminate\Routing\Route;
7
use Illuminate\Routing\Router;
8
-use Illuminate\Routing\RouteCollection;
9
use Dingo\Api\Contract\Routing\Adapter;
+use Illuminate\Routing\RouteCollection;
10
use Dingo\Api\Exception\UnknownVersionException;
11
12
class Laravel implements Adapter
@@ -119,6 +119,10 @@ protected function mergeOldRoutes($version)
119
*/
120
public function getRouteProperties($route, Request $request)
121
{
122
+ if (method_exists($route, 'uri') && method_exists($route, 'methods')) {
123
+ return [$route->uri(), $route->methods(), $route->getAction()];
124
+ }
125
+
126
return [$route->getUri(), $route->getMethods(), $route->getAction()];
127
}
128
0 commit comments