{"id":33990225,"url":"https://github.com/mbpcoder/laravel-api-versioning","last_synced_at":"2026-04-10T10:02:35.243Z","repository":{"id":56899620,"uuid":"272898737","full_name":"mbpcoder/laravel-api-versioning","owner":"mbpcoder","description":"API versioning for Laravel","archived":false,"fork":false,"pushed_at":"2023-04-03T14:25:40.000Z","size":22,"stargazers_count":19,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-21T23:28:30.663Z","etag":null,"topics":["laravel","laravel-package"],"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/mbpcoder.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-17T06:45:24.000Z","updated_at":"2024-07-27T10:22:01.000Z","dependencies_parsed_at":"2022-08-21T01:50:31.795Z","dependency_job_id":null,"html_url":"https://github.com/mbpcoder/laravel-api-versioning","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mbpcoder/laravel-api-versioning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbpcoder%2Flaravel-api-versioning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbpcoder%2Flaravel-api-versioning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbpcoder%2Flaravel-api-versioning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbpcoder%2Flaravel-api-versioning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbpcoder","download_url":"https://codeload.github.com/mbpcoder/laravel-api-versioning/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbpcoder%2Flaravel-api-versioning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31637748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["laravel","laravel-package"],"created_at":"2025-12-13T06:04:23.034Z","updated_at":"2026-04-10T10:02:35.224Z","avatar_url":"https://github.com/mbpcoder.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Versioning for Laravel\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/mbpcoder/laravel-api-versioning.svg?style=flat-square)](https://packagist.org/packages/mbpcoder/laravel-api-versioning)\n[![Total Downloads](https://img.shields.io/packagist/dt/mbpcoder/laravel-api-versioning.svg?style=flat-square)](https://packagist.org/packages/mbpcoder/laravel-api-versioning)\n\nThis is a very simple package to support API versioning in Laravel 8,7,6,5. this package provide fallback API capability for Laravel.\n\n## Features\n* If you have one API version it will automatically disable\n* You can disable package in config files\n* You can add countless API Versions in config file\n* Does not affect routes except API\n\n## Let's Code!\nIf you call for /{version_number}/version every API have it is own route.\nIf you call for /v2.1/hello-world it will try to call v2.1 and if it does not find a route will search v2\nthen if the version 2 also does not have the routes it will fallback to v1\n``` php\n\n// laravel route file\nRoute::prefix('v2.1')-\u003egroup(function () {\n    Route::get('version', function () {\n        return 'API v2.1';\n    });\n});\n\nRoute::prefix('v2')-\u003egroup(function () {\n    Route::get('version', function () {\n        return 'API v2';\n    });\n});\n\nRoute::prefix('v1')-\u003egroup(function () {\n    Route::get('version', function () {\n        return 'API v1';\n    });\n\n    Route::get('hello-world', function () {\n        return 'Hello World!';\n    });\n});\n\n```\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require mbpcoder/laravel-api-versioning\n```\n\n## Usage\n\nPublish config file\n\n``` php\nphp artisan vendor:publish --provider=\"MbpCoder\\ApiVersioning\\ApiVersioningServiceProvider\"\n```\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Credits\n\n- [Mahdi Bagheri](https://github.com/mbpcoder)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## Laravel Package Boilerplate\n\nThis package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbpcoder%2Flaravel-api-versioning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbpcoder%2Flaravel-api-versioning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbpcoder%2Flaravel-api-versioning/lists"}