PHPackages                             royx0612/laravel-api-versioning - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. royx0612/laravel-api-versioning

ActiveLibrary[API Development](/categories/api)

royx0612/laravel-api-versioning
===============================

Laravel API 版本控制器生成工具

v1.1.4(1y ago)01.1kMITPHPPHP ^8.1

Since Mar 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/royx0612/LaravelApiVersioning)[ Packagist](https://packagist.org/packages/royx0612/laravel-api-versioning)[ RSS](/packages/royx0612-laravel-api-versioning/feed)WikiDiscussions dev Synced 1mo ago

READMEChangelogDependencies (1)Versions (19)Used By (0)

Laravel API Versioning
======================

[](#laravel-api-versioning)

A Laravel Artisan command that helps you quickly scaffold versioned API components, including:

- Controller
- Form Request
- Resource
- Service
- (Optional) Test class
- (Optional) Route
- (Optional) Policy

Installation
------------

[](#installation)

```
composer require royx0612/laravel-api-versioning --dev
```

Configuration
-------------

[](#configuration)

You can publish the config file and stubs:

```
php artisan vendor:publish --tag=laravel-api-versioning
```

This will publish:

- `config/versioned.php`
- `stubs/vendor/laravel-api-versioning/`

If you want to customize the stubs, you may modify the files inside `stubs/vendor/laravel-api-versioning/` and update your config path accordingly.

Usage
-----

[](#usage)

```
php artisan make:api-controller v1 UserController --with-test --with-route --with-policy
```

This command will create:

- `App\Http\Controllers\Api\V1\UserController`
- `App\Http\Requests\Api\V1\UserRequest`
- `App\Http\Resources\Api\V1\UserResource`
- `App\Services\V1\UserService`
- (Optional) `Tests\Feature\Api\V1\UserTest`
- (Optional) Append route to `routes/api.php`
- (Optional) `App\Policies\V1\UserPolicy`

Options
-------

[](#options)

OptionDescription`--with-test`Create a test file`--with-route`Append route automatically`--with-policy`Generate a policy file`--force`Overwrite existing filesCustom Stub Path
----------------

[](#custom-stub-path)

You can customize stub path in `config/versioned.php`:

```
'stub_path' => 'stubs/vendor/laravel-api-versioning',
'policy_namespace_prefix' => 'App\Policies',
```

License
-------

[](#license)

MIT

Author: [royx0612](https://github.com/royx0612)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance46

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

18

Last Release

406d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d0604eccee4c86516cb4ed454c14000e983ddee747efc8873c262977b82732c6?d=identicon)[royx0612](/maintainers/royx0612)

---

Top Contributors

[![royx0612](https://avatars.githubusercontent.com/u/15884644?v=4)](https://github.com/royx0612 "royx0612 (17 commits)")

### Embed Badge

![Health badge](/badges/royx0612-laravel-api-versioning/health.svg)

```
[![Health](https://phpackages.com/badges/royx0612-laravel-api-versioning/health.svg)](https://phpackages.com/packages/royx0612-laravel-api-versioning)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[echolabsdev/prism

A powerful Laravel package for integrating Large Language Models (LLMs) into your applications.

2.3k388.3k10](/packages/echolabsdev-prism)[sajya/server

Easy implementation of the JSON-RPC 2.0 server for the Laravel framework.

2391.9M4](/packages/sajya-server)[wotz/laravel-swagger-ui

Add Swagger UI to a Laravel application.

277321.8k](/packages/wotz-laravel-swagger-ui)[vemcogroup/laravel-weather

Weather package for Laravel to use different providers to get weather info

5525.0k](/packages/vemcogroup-laravel-weather)[yakovenko/laravel-lighthouse-graphql-multi-schema

A Laravel package that provides multi-schema support for Lighthouse GraphQL.

1562.5k](/packages/yakovenko-laravel-lighthouse-graphql-multi-schema)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
