title: Call to undefined method Illuminate\Routing\Route::getUri()
body: <p>I am trying to make rest api with dingo for laravel 5.3 . I have setup dingo on my project and created a api route like this for test .</p>
  
  <pre><code> $api-&gt;version('v1', function ($api) {
      $api-&gt;get('hello',function (){
  
          return "hello";
      });
  
  });
  </code></pre>
  
  <p>But when i run  <a href="http://localhost:8000/api/hello" rel="nofollow noreferrer">http://localhost:8000/api/hello</a></p>
  
  <p>Then </p>
  
  <pre><code>{
  message: "Call to undefined method Illuminate\Routing\Route::getUri()",
  code: 1,
  status_code: 500,
  debug: {
  line: 98,
  file: "C:\xampp\htdocs\apiTest\vendor\dingo\api\src\Routing\Adapter\Laravel.php",
  class: "Symfony\Component\Debug\Exception\FatalErrorException",
  trace: [
  "#0 {main}"
  ]
  }
  }
  </code></pre>
  
  <p>is shown . </p>
  
  <p>i have searched and find this solution 
  <a href="https://stackoverflow.com/questions/32285647/call-to-undefined-method-illuminate-routing-routeget">Call to undefined method Illuminate\Routing\Route::get()</a></p>
  
  <p>but when i used </p>
  
  <pre><code>use Illuminate\Support\Facades\Route;
  </code></pre>
  
  <p>then this problem shown</p>
  
  <pre><code>FatalErrorException in Laravel.php line 116:
  Call to undefined method Illuminate\Support\Facades\Route::where()
  </code></pre>
  
  <p>This is the Laravel.php file</p>
  
  <pre><code>&lt;?php
  
  namespace Dingo\Api\Routing\Adapter;
  
  use Illuminate\Http\Request;
  use Illuminate\Routing\Route;
  use Illuminate\Routing\Router;
  use Illuminate\Routing\RouteCollection;
  use Dingo\Api\Contract\Routing\Adapter;
  use Dingo\Api\Exception\UnknownVersionException;
  
  class Laravel implements Adapter
  {
      /**
       * Laravel router instance.
       *
       * @var \Illuminate\Routing\Router
       */
      protected $router;
  
      /**
       * Array of registered routes.
       *
       * @var array
       */
      protected $routes = [];
  
      /**
       * Old routes already defined on the router.
       *
       * @var \Illuminate\Routing\RouteCollection
       */
      protected $oldRoutes;
  
      /**
       * Create a new laravel routing adapter instance.
       *
       * @param \Illuminate\Routing\Router $router
       *
       * @return void
       */
      public function __construct(Router $router)
      {
          $this-&gt;router = $router;
      }
  
      /**
       * Dispatch a request.
       *
       * @param \Illuminate\Http\Request $request
       * @param string                   $version
       *
       * @return mixed
       */
      public function dispatch(Request $request, $version)
      {
          if (! isset($this-&gt;routes[$version])) {
              throw new UnknownVersionException;
          }
  
          $routes = $this-&gt;mergeExistingRoutes($this-&gt;routes[$version]);
  
          $this-&gt;router-&gt;setRoutes($routes);
  
          return $this-&gt;router-&gt;dispatch($request);
      }
  
      /**
       * Merge the existing routes with the new routes.
       *
       * @param \Illuminate\Routing\RouteCollection $routes
       *
       * @return \Illuminate\Routing\RouteCollection
       */
      protected function mergeExistingRoutes(RouteCollection $routes)
      {
          if (! isset($this-&gt;oldRoutes)) {
              $this-&gt;oldRoutes = $this-&gt;router-&gt;getRoutes();
          }
  
          foreach ($this-&gt;oldRoutes as $route) {
              $routes-&gt;add($route);
          }
  
          return $routes;
      }
  
      /**
       * Get the URI, methods, and action from the route.
       *
       * @param mixed                    $route
       * @param \Illuminate\Http\Request $request
       *
       * @return array
       */
      public function getRouteProperties($route, Request $request)
      {
          return [$route-&gt;getUri(), $route-&gt;getMethods(), $route-&gt;getAction()];
      }
  
      /**
       * Add a route to the appropriate route collection.
       *
       * @param array  $methods
       * @param array  $versions
       * @param string $uri
       * @param mixed  $action
       *
       * @return \Illuminate\Routing\Route
       */
      public function addRoute(array $methods, array $versions, $uri, $action)
      {
          $this-&gt;createRouteCollections($versions);
  
          $route = new Route($methods, $uri, $action);
          $route-&gt;where($action['where']);
  
          foreach ($versions as $version) {
              $this-&gt;routes[$version]-&gt;add($route);
          }
  
          return $route;
      }
  
      /**
       * Create the route collections for the versions.
       *
       * @param array $versions
       *
       * @return void
       */
      protected function createRouteCollections(array $versions)
      {
          foreach ($versions as $version) {
              if (! isset($this-&gt;routes[$version])) {
                  $this-&gt;routes[$version] = new RouteCollection;
              }
          }
      }
  
      /**
       * Get all routes or only for a specific version.
       *
       * @param string $version
       *
       * @return mixed
       */
      public function getRoutes($version = null)
      {
          if (! is_null($version)) {
              return $this-&gt;routes[$version];
          }
  
          return $this-&gt;routes;
      }
  
      public function getIterableRoutes($version = null)
      {
          return $this-&gt;getRoutes($version);
      }
  
      /**
       * Set the routes on the adapter.
       *
       * @param array $routes
       *
       * @return void
       */
      public function setRoutes(array $routes)
      {
          $this-&gt;routes = $routes;
      }
  
      /**
       * Prepare a route for serialization.
       *
       * @param mixed $route
       *
       * @return mixed
       */
      public function prepareRouteForSerialization($route)
      {
          $route-&gt;prepareForSerialization();
  
          return $route;
      }
  
      /**
       * Gather the route middlewares.
       *
       * @param \Illuminate\Routing\Route $route
       *
       * @return array
       */
      public function gatherRouteMiddlewares($route)
      {
          return $this-&gt;router-&gt;gatherRouteMiddlewares($route);
      }
  }
  </code></pre>
  
  <p>Has there any solution ?
  Thanks</p>