LaravelPackages.net
Acme Inc.
Toggle sidebar
luna/laravel-seo-urls

Create SEO friendly urls/routes

62
0
1.0.0
About luna/laravel-seo-urls

luna/laravel-seo-urls is a Laravel package for create seo friendly urls/routes. It currently has 0 GitHub stars and 62 downloads on Packagist (latest version 1.0.0). Install it with composer require luna/laravel-seo-urls. Discover more Laravel packages by luna or browse all Laravel packages to compare alternatives.

Last updated

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();
    }

Star History Chart