Skip to content

Commit

Permalink
Merge pull request dingo#1314 from denpamusic/master
Browse files Browse the repository at this point in the history
Laravel 5.4 Illuminate/Routing/Route class changes.
  • Loading branch information
jasonlewis authored Jan 25, 2017
2 parents 9427f5c + 8d3aee0 commit 446bab2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Routing/Adapter/Laravel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
use Illuminate\Routing\Router;
use Illuminate\Routing\RouteCollection;
use Dingo\Api\Contract\Routing\Adapter;
use Illuminate\Routing\RouteCollection;
use Dingo\Api\Exception\UnknownVersionException;

class Laravel implements Adapter
Expand Down Expand Up @@ -119,6 +119,10 @@ protected function mergeOldRoutes($version)
*/
public function getRouteProperties($route, Request $request)
{
if (method_exists($route, 'uri') && method_exists($route, 'methods')) {
return [$route->uri(), $route->methods(), $route->getAction()];
}

return [$route->getUri(), $route->getMethods(), $route->getAction()];
}

Expand Down

0 comments on commit 446bab2

Please sign in to comment.