{"id":28446898,"url":"https://github.com/ymigval/laravel-wwwprotocolresolver","last_synced_at":"2025-06-30T06:32:40.763Z","repository":{"id":218446476,"uuid":"746217588","full_name":"ymigval/laravel-wwwprotocolresolver","owner":"ymigval","description":"Redirect with or without www. and from http to https in Laravel.","archived":false,"fork":false,"pushed_at":"2024-12-26T19:18:23.000Z","size":48,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T14:35:54.295Z","etag":null,"topics":["http","https","laravel","protocol","redirect","seo-optimization","www"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ymigval.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-21T12:27:51.000Z","updated_at":"2024-12-26T19:17:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b7798b0-8ecd-4449-b312-292bd8b65591","html_url":"https://github.com/ymigval/laravel-wwwprotocolresolver","commit_stats":null,"previous_names":["ymigval/laravel-wwwprotocolresolver"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ymigval/laravel-wwwprotocolresolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymigval%2Flaravel-wwwprotocolresolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymigval%2Flaravel-wwwprotocolresolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymigval%2Flaravel-wwwprotocolresolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymigval%2Flaravel-wwwprotocolresolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ymigval","download_url":"https://codeload.github.com/ymigval/laravel-wwwprotocolresolver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymigval%2Flaravel-wwwprotocolresolver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262723772,"owners_count":23354107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http","https","laravel","protocol","redirect","seo-optimization","www"],"created_at":"2025-06-06T11:08:37.469Z","updated_at":"2025-06-30T06:32:40.755Z","avatar_url":"https://github.com/ymigval.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel WWW Protocol Resolver\n\nThe \"laravel-wwwprotocolresolver\" package provides easy configuration for redirecting responses with or without \"www\" and with the specified protocol (http or https) in Laravel applications. You can customize the redirection type (permanent or temporary), scheme (http or https), and redirection mode (with or without \"www\") according to your needs.\n\n\n## Installation\n\nTo install the package, run the following command in your Laravel project's terminal:\n\n\n```bash\ncomposer require ymigval/laravel-wwwprotocolresolver\n```\n\n## Publish configuration file (optional)\n\nIf you want to customize the package configuration, you can publish the configuration file using the following command:\n\n```bash\nphp artisan vendor:publish --tag=\"wwwprotocolresolver\"\n```\n\n## Usage\n\nTo use the package, simply add the following environment variables to your .env file:\n\n```dotenv\n# Supported: \"http\", \"https\"\nWWW_PROTOCOL_RESOLVER_USE=https\n\n# Supported: \"with_www\", \"without_www\"\nWWW_PROTOCOL_RESOLVER_MODE=with_www\n```\nEnsure that you set these configurations only in production environments to avoid unwanted redirections during development.\n\n\n\n### Configuration\n\nYou can adjust the package configuration in the `config/wwwprotocolresolver.php` file. Here, you can define the redirection type (301 or 302), scheme (http or https), and redirection mode (with or without \"www\") according to your preferences.\n\n\n```php\nreturn [\n    'type' =\u003e env('WWW_PROTOCOL_RESOLVER_TYPE', 301),\n    'use' =\u003e env('WWW_PROTOCOL_RESOLVER_USE'),\n    'mode' =\u003e env('WWW_PROTOCOL_RESOLVER_MODE'),\n];\n```\n\nThis package allows you to enhance the security and consistency of your URLs by ensuring that all users are redirected to the preferred version of your website.\n\n\n## Changelog\nPlease refer to the [CHANGELOG](CHANGELOG.md) for more information about recent changes.\n\n\n## License\nThe MIT License (MIT). For more information, please see the [License File](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymigval%2Flaravel-wwwprotocolresolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fymigval%2Flaravel-wwwprotocolresolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymigval%2Flaravel-wwwprotocolresolver/lists"}