Simple package to redirect www domains to non-www in your Laravel application.
$ composer require redcenter/laravel-www-redirect
Add the middleware class to your Kernel.php in App\Http:
protected $middlewareGroups = [
'web' => [
...
LaravelWwwRedirectMiddleware::class,
...
],
];
You can contact me through my website: redcenter.nl
Check out the documentation on Bitbucket for all details!