Skip to content

Commit

Permalink
Merge pull request #23 from huntie/routing-updates
Browse files Browse the repository at this point in the history
Extended router fixes
  • Loading branch information
huntie committed May 1, 2017
2 parents ed4ef14 + 6175f81 commit 66d0a7d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
@@ -1,6 +1,6 @@
<?php

namespace Huntie\JsonApi;
namespace Huntie\JsonApi\Providers;

use Illuminate\Support\ServiceProvider;

Expand Down
21 changes: 21 additions & 0 deletions src/Routing/KernelRouterAssociation.php
@@ -0,0 +1,21 @@
<?php

namespace Huntie\JsonApi\Routing;

trait KernelRouterAssociation
{
/**
* Get the route dispatcher callback.
*
* @return \Closure
*/
protected function dispatchToRouter()
{
// Whilst Laravel provides the package Router instance within all app
// code, it is hardcoded in the base Kernel class and needs to be set
// directly here when we are using custom JSON API router extensions.
parent::__construct($this->app, $this->app['router']);

return parent::dispatchToRouter();
}
}

0 comments on commit 66d0a7d

Please sign in to comment.