luna / laravel-seo-urls
Create SEO friendly urls/routes
1.0.0
2019-03-10 17:20 UTC
Requires
- illuminate/database: ^5.8
- illuminate/support: ^5.8
This package is auto-updated.
Last update: 2024-11-18 21:10:56 UTC
README
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(); }