{"id":28472025,"url":"https://github.com/parallax/laravel-protocol","last_synced_at":"2025-07-02T00:31:45.521Z","repository":{"id":57035930,"uuid":"123474286","full_name":"parallax/laravel-protocol","owner":"parallax","description":null,"archived":false,"fork":false,"pushed_at":"2018-03-01T18:15:54.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-30T00:11:22.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/parallax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-01T18:13:58.000Z","updated_at":"2018-03-01T18:15:55.000Z","dependencies_parsed_at":"2022-08-23T21:00:14.362Z","dependency_job_id":null,"html_url":"https://github.com/parallax/laravel-protocol","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/parallax/laravel-protocol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallax%2Flaravel-protocol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallax%2Flaravel-protocol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallax%2Flaravel-protocol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallax%2Flaravel-protocol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parallax","download_url":"https://codeload.github.com/parallax/laravel-protocol/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallax%2Flaravel-protocol/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263055967,"owners_count":23406805,"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":[],"created_at":"2025-06-07T11:09:41.352Z","updated_at":"2025-07-02T00:31:45.513Z","avatar_url":"https://github.com/parallax.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Protocol\nHandles detection of http protocol and changes internal links and redirects to match.\n\n### Installation\n\nYou will need composer to install this package (get composer). Then run:\n\n```bash\ncomposer require parallax/laravel-protocol\n```\n\n#### Register Service Provider\n\nAdd the below into your `config/app.php` within `providers` array\n\n```\nParallax\\Protocol\\ProtocolServiceProvider::class\n```\n\nAfter installation you will need to publish the config file. To do this run:\n\n```bash\nphp artisan vendor:publish --tag=protocol.config\n```\n\nThis will create the file `config/protocol.php` where you can configure the settings.\n\n### Configuration\n\n#### `auto`\n\nIf set to true this will automatically match the internal links to the current users protocol.\n\n#### `protocol`\n\nIf set this will force internal links and redirect users to the set protocol. Accepted values are `http` or `https`. Leave blank to not set.\n\n#### `environments`\n\nYou can add your own name for environments within this array. The key of the array should match your used `APP_ENV` values for it to detect correctly.\n\nWithin each environment you can set `https` to `true` or `false`. If `true` this will change all internal linking to `https`. If you set `redirect` to `true` then this will force all users to `https`, but only if you have set `https` to `true`.\n\n##### Example Config\n\n```php\n/**\n * Automatically detect based on current protocol\n */\n'auto' =\u003e false,\n\n/**\n * Force everything to a set protocol either\n * 'http' or 'https'. If blank then won't \n * force anything. Ignored if 'auto' is true.\n */\n'protocol' =\u003e '',\n\n/**\n * Use different rules per environment\n * Ignored if 'auto' is true or 'protocol' is set.\n */\n'environments' =\u003e [\n    'local' =\u003e [\n        'https' =\u003e false,\n        'redirect' =\u003e false\n    ],\n    'production' =\u003e [\n        'https' =\u003e true,\n        'redirect' =\u003e false\n    ]\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparallax%2Flaravel-protocol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparallax%2Flaravel-protocol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparallax%2Flaravel-protocol/lists"}