PHPackages                             alexmaramaldo/swaggervel-2 - 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. alexmaramaldo/swaggervel-2

ActiveLibrary[API Development](/categories/api)

alexmaramaldo/swaggervel-2
==========================

A great way to integrate Swagger into Laravel

02.9k[1 issues](https://github.com/alexmaramaldo/swaggervel-2/issues)JavaScript

Since Sep 4Pushed 8y ago1 watchersCompare

[ Source](https://github.com/alexmaramaldo/swaggervel-2)[ Packagist](https://packagist.org/packages/alexmaramaldo/swaggervel-2)[ RSS](/packages/alexmaramaldo-swaggervel-2/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Swagger 2
=========

[](#swagger-2)

This branch uses Swagger-spec 2.0 and Swagger-php 2.0. This branch also updates the Swagger-ui to version 2.1.1.

OAuth2
======

[](#oauth2)

The Swagger-ui was changed to allow inserting the OAuth 2 parameters (`client_id`, `client_secret`, `realm` and `appName`) directly in the ui. You can also pass these values in the url in the URL, like so: `http://api.appcursos.com/api-docs?client_id=my-client-id&client_secret=my-client-secret&realm=my-realm&appName=my-app-name`

To use Swaggervel for Laravel 4.2, use the version 1.0 branch ()

Swaggervel
==========

[](#swaggervel)

Swagger for Laravel

This package combines [Swagger-php](https://github.com/zircote/swagger-php) and [swagger-ui](https://github.com/wordnik/swagger-ui) into one Laravel-friendly package.

When you run your app in debug mode, Swaggervel will scan your app folder (or any folder that is set under the "app-dir" variable in the packages config), generate swagger json files and deposit them to the doc-dir folder (default is `/docs`). Files are then served by swagger-ui under the api-docs director.

Installation
============

[](#installation)

- Add `Jlapp\Swaggervel\SwaggervelServiceProvider` to your providers array in `app/config/app.php` above your route provider, to avoid any catch-all routes
- Run `php artisan vendor:publish` to push swagger-ui to your public folder.

Example
=======

[](#example)

- [www.example.com/docs](http://www.example.com/docs) &lt;- swagger JSON files are visible
- [www.example.com/api-docs](http://www.example.com/api-docs) &lt;- swagger ui is visible.

Options
=======

[](#options)

Uncomment the "viewHeaders" option in the Config file to add headers to your view.

How to Use Swagger-php
======================

[](#how-to-use-swagger-php)

The actual Swagger spec is beyond the scope of this package. All Swaggervel does is package up swagger-php and swagger-ui in a Laravel-friendly fashion, and tries to make it easy to serve. For info on how to use swagger-php [look here](http://zircote.com/swagger-php/). For good examples of swagger-php in action [look here](https://github.com/zircote/swagger-php/tree/master/Examples/Petstore).
===========================================================================================================================================================================================================================================================================================================================================================================================================

[](#the-actual-swagger-spec-is-beyond-the-scope-of-this-package-all-swaggervel-does-is-package-up-swagger-php-and-swagger-ui-in-a-laravel-friendly-fashion-and-tries-to-make-it-easy-to-serve-for-info-on-how-to-use-swagger-php-look-here-for-good-examples-of-swagger-php-in-action-look-here)

### For Laravel 5, please use the [2.0 branch](https://github.com/slampenny/Swaggervel/tree/2.0)!

[](#for-laravel-5-please-use-the-20-branch)

### For Laravel 4, please use the [1.0 branch](https://github.com/slampenny/Swaggervel/tree/1.0)!

[](#for-laravel-4-please-use-the-10-branch)

Swaggervel
==========

[](#swaggervel-1)

Swagger for Laravel

This package combines [Swagger-php](https://github.com/zircote/swagger-php) and [swagger-ui](https://github.com/wordnik/swagger-ui) into one Laravel-friendly package.

When you run your app in debug mode, Swaggervel will scan your app folder (or any folder that is set under the "app-dir" variable in the packages config), generate swagger json files and deposit them to the doc-dir folder (default is `/docs`). Files are then served by swagger-ui under the api-docs director.

Installation
============

[](#installation-1)

- Add `Jlapp\Swaggervel\SwaggervelServiceProvider` to your providers array in `app/config/app.php` above your routes provider (to avoid catch all routes)
- Run `php artisan vendor:publish` to push config files to your app folder.

Example
=======

[](#example-1)

- [www.example.com/docs](http://www.example.com/docs) &lt;- swagger JSON files are visible
- [www.example.com/api-docs](http://www.example.com/api-docs) &lt;- swagger ui is visible.

Options
=======

[](#options-1)

Uncomment the "viewHeaders" option in the Config file to add headers to your view.

How to Use Swagger-php
======================

[](#how-to-use-swagger-php-1)

The actual Swagger spec is beyond the scope of this package. All Swaggervel does is package up swagger-php and swagger-ui in a Laravel-friendly fashion, and tries to make it easy to serve. For info on how to use swagger-php [look here](http://zircote.com/swagger-php/). For good examples of swagger-php in action [look here](https://github.com/zircote/swagger-php/tree/master/Examples/Petstore).

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13985668?v=4)[Alex Maramaldo](/maintainers/alexmaramaldo)[@alexmaramaldo](https://github.com/alexmaramaldo)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/alexmaramaldo-swaggervel-2/health.svg)

```
[![Health](https://phpackages.com/badges/alexmaramaldo-swaggervel-2/health.svg)](https://phpackages.com/packages/alexmaramaldo-swaggervel-2)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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