PHPackages                             scalar/laravel - 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. scalar/laravel

ActiveLibrary[API Development](/categories/api)

scalar/laravel
==============

Render your OpenAPI-based API reference

0.2.1(1mo ago)6183.9k—1.4%62MITPHPPHP ^8.2||^8.3CI passing

Since Sep 12Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/scalar/laravel)[ Packagist](https://packagist.org/packages/scalar/laravel)[ Docs](https://github.com/scalar/laravel)[ RSS](/packages/scalar-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (16)Versions (7)Used By (2)

Scalar for Laravel
==================

[](#scalar-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/51e1ef3c612c855f42e2a4df162cc879bcac9b43b4fcec68ad63579ff6fe4f9b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7363616c61722f6c61726176656c2e7376673f7374796c653d666c6174)](https://packagist.org/packages/scalar/laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3f51ba55595ebf82dc545bcd3bc09df6385ed0cf54bb174e157dbdf4aeebf416/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7363616c61722f6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c6174)](https://github.com/scalar/laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c06df9e61287e273a1f05fd31b82b9755547a77123445d35f0da80673c6c388a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7363616c61722f6c61726176656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c6174)](https://github.com/scalar/laravel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/f3e7f27df19fd7922b799787d5056d57d99c1690bfbbc55d6bf54a629f381dc1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7363616c61722f6c61726176656c2e7376673f7374796c653d666c6174)](https://packagist.org/packages/scalar/laravel)

Use your OpenAPI documents to render modern API references in Laravel

[![Screenshot of a Laravel-themed API reference](.github/screenshot.png)](.github/screenshot.png)

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

[](#installation)

You can install the package via composer:

```
composer require scalar/laravel
```

You can publish the config file with:

```
php artisan vendor:publish --tag="scalar-config"
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="scalar-views"
```

Usage
-----

[](#usage)

You’ll need an OpenAPI/Swagger document to render your API reference with Scalar. Here are some packages that help generating those documents:

- [knuckleswtf/scribe](https://github.com/knuckleswtf/scribe)
- [dedoc/scramble](https://github.com/dedoc/scramble)
- [vyuldashev/laravel-openapi](https://github.com/vyuldashev/laravel-openapi)

Once done, you can pass it to Scalar. Just make sure it’s a publicly accessible URL.

```
