laravel-seo-urls maintained by luna
Description
Create SEO friendly urls/routes
Author
Last update
2019/03/10 18:20
(dev-master)
License
Downloads
62
SEO Urls
Setup
Add the service provider to the providers in config/app.php AFTER the RouteServiceProvider.
Luna\SeoUrls\SeoUrlServiceProvider::class
Add the following code to app/Http/Kernel.php
/**
* Get the route dispatcher callback.
*
* @return \Closure
*/
protected function dispatchToRouter()
{
$this->router = $this->app->make('router');
foreach ($this->routeMiddleware as $key => $middleware) {
$this->router->aliasMiddleware($key, $middleware);
}
foreach ($this->middlewareGroups as $key => $middleware) {
$this->router->middlewareGroup($key, $middleware);
}
return parent::dispatchToRouter();
}