Skip to content

Mahegus/lumen-api-versioning

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lumen Framework API Versioning

Versioning your lumen api using Accept Header and calls the corresponding controller based on version given.

Installation

Just copy the app folder and config. NOTE: Under the app/Providers folder AppServiceProvider class is there so just copy paste the app binding to your AppServiceProvider class.

Usage

In your routes/web.php, register the App\Http\Middleware\VersionControl class to your routes.

$app->group(['prefix', '/', 'middleware' => App\Http\Middleware\VersionControl::class], function ($app) {
    // routes resides here
});

Also do not forget to autoload config/api.php in your bootstrap/app.php.

$app->configure('api');

Author

Feel free to modify the code and open-sourced it. I did it because i love programming. :)

About

Lumen Framework API Versioning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%