Download the PHP package php-nl/laravel-api-doc without Composer

On this page you can find all versions of the php package php-nl/laravel-api-doc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-api-doc

Laravel API Doc

A highly configurable, beautiful, and interactive API documentation generator for Laravel.

Latest Version on Packagist PHP from Packagist Total Downloads License


Laravel API Doc is an elegant, zero-configuration API documentation package designed to give your Laravel projects a beautiful, interactive dashboard out of the box.

Inspired by Laravel's clean DX and the capabilities of packages like Scramble and Scribe, it automatically parses your routes, form requests, models, and JSON resources to generate a live, testable API portal exactly when you need itโ€”without requiring you to write endless generic PHPDoc blocks.

โœจ Features


๐Ÿ“ฆ Installation

Requires PHP 8.3+ and Laravel 11+.

You can install the package via Composer:

Next, publish the configuration file and assets using:

๐Ÿš€ Usage

Once installed, simply navigate to the predefined documentation route in your browser:

Defining Endpoints

The package leverages Laravel's native routing metadata. Standard PHPDoc blocks, FormRequest validations, and parameter Model bindings are automatically extracted to document your API.

If your controller method returns a JsonResource or invokes a FormRequest, the package uses AST Parsing and Reflection to read the structure of your application without actually executing destructive code.

Customizing Endpoints via Attributes

Sometimes, you want to explicitly document query parameters or body payloads that aren't tied to a FormRequest, or you want to group your routes logically. Laravel API Doc provides custom PHP attributes for the ultimate developer experience (DX).

Grouping & Naming

Organize your routes in the sidebar using the #[ApiDoc] attribute:

Manual Parameters

If you pull data directly from the Request (e.g., request('status')) instead of using a FormRequest, you can document it seamlessly using parameter attributes:

Unauthenticated Routes

By default, the UI assumes your endpoints are secure (requiring Bearer tokens if auth middleware is detected). To mark a route as public (like login or register), use the #[Unauthenticated] attribute:


๐Ÿšซ Excluding Routes

You might not want your internal or horizon routes showing up in the documentation. Laravel API Doc provides 4 elegant ways to filter out routes.

1. Via Configuration Patterns (URL, Name, Middleware)

Open your config/laravel-api-doc.php and define exclusion rules:

2. Via PHP Attributes

For the ultimate localized DX, you can ignore a specific Controller or Method directly in the code:


โš™๏ธ Configuration

You can fully customize the behavior and look of your documentation by modifying config/laravel-api-doc.php.

Global Authentication

Use the Security & Authentication panel (found on the dashboard's welcome screen) to securely define your tokens locally. These tokens are placed in your browser's local storage and injected directly into the "Try It Out" playground.

Custom Markdown Pages

You can write standard .md Markdown files (e.g., Getting-Started.md, Authentication.md) and place them in the resources/docs/api directory (configurable via docs_path). They will be parsed dynamically and explicitly shown in your API sidebar navigation.


๐Ÿ›  Artisan Commands

For production environments or advanced CI/CD pipelines, Laravel API Doc provides several helpful commands:

Caching Documentation

Parsing ASTs and reflecting over hundreds of controllers can be heavy. In production, you should cache the schema:

To clear the cache:

JSON Response Generation

Want to show real JSON responses instead of just schema types? Run the response generator command. It will execute safe GET endpoints locally to capture live representations of your API returns.

OpenAPI Export

Export your documentation to an OpenAPI 3.1.0 compatible openapi.json file. You can view your schema live at /docs/api/openapi.json or generate it via CLI:


๐Ÿค Contributing

Please see CONTRIBUTING for details.

๐Ÿ“„ License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-api-doc with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
livewire/livewire Version ^3.0|^4.0
phpstan/phpdoc-parser Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-nl/laravel-api-doc contains the following files

Loading the files please wait ...