Download the PHP package botnetdobbs/laravel-luminous without Composer

On this page you can find all versions of the php package botnetdobbs/laravel-luminous. 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-luminous

Luminous

build Packagist Downloads

Generate OpenAPI 3.2.0 docs from PHP 8 Attributes on your Laravel controllers.

No YAML files to maintain. No docblocks to parse. Put a few attributes on your controllers, let your FormRequest rules() define the request body, document your API Resources with a single static schema() method, and Luminous builds the full spec automatically.

Request bodies follow your FormRequest rules(), so they stay up to date with validation. Response docs use a separate schema() method (or #[ApiProperty]). Keep schema() next to toArray() so the docs still match what you return.

Docs: botnet-dobbs.github.io/laravel-luminous

Requirements

Laravel Version
Laravel 11.x
Laravel 12.x
Laravel 13.x

Installation

Publish the config file:

Your API docs are live at /docs.

Local vs production

By default, docs work right away on your machine: no login, UI turned on. That is on purpose so you can install the package and open /docs immediately.

On a production server, protect the docs or turn them off:

Also build the cache when you deploy and limit which routes get documented with include_routes. Details:


Quick Look

The controller

Tag the controller and secure it. Every method inside inherits both automatically.

Luminous detects CreatePaymentRequest from the type hint and reads its rules() to build the request body schema. It detects Payment as a route model bound parameter and maps it to the {payment} segment automatically. No wiring required.

The FormRequest

rules() defines the schema. hints() adds descriptions and examples for fields that need more context. You only need hints() when the field name alone is not enough.

The API Resource

Add #[ApiShape] and write a schema() method. Luminous calls it when building the response schema.

That is the whole picture. The individual docs below go into every detail.


Documentation

Full docs: botnet-dobbs.github.io/laravel-luminous


Attribute Reference

Attribute Where it goes What it does
#[ApiOperation] Method Summary, description, optional operationId, and optional externalDocsUrl link
#[ApiTag] Class or Method Group endpoints in the sidebar. Supports summary, parent, kind for hierarchical grouping, and externalDocsUrl
#[ApiBody] Method Override the auto-detected request class or add a description
#[ApiResponse] Method Document a response status code (repeatable)
#[ApiResponseHeader] Method Document a response header on a specific status code (repeatable)
#[ApiParam] Method Document a path parameter, including route model bound params (repeatable). Supports deprecated, style (simple, label, matrix), and explode
#[ApiQuery] Method Document a query string parameter (repeatable). Supports deprecated, location for in: querystring, style (form, spaceDelimited, pipeDelimited, deepObject), and explode
#[ApiStream] Method Document a streaming endpoint (SSE, JSONL). Emits itemSchema instead of schema
#[ApiHeader] Method Document a request header (repeatable). Supports style (simple) and explode
#[ApiSecurity] Class or Method Declare a required security scheme with optional scopes (repeatable)
#[ApiNoSecurity] Method Mark an endpoint as requiring no authentication
#[ApiDeprecated] Method Mark an endpoint as deprecated with a reason and replacement
#[ApiIgnore] Class or Method Exclude from documentation entirely
#[ApiExample] Method Named request or response example (repeatable). Supports externalValue, dataValue, and serializedValue for non-JSON targets
#[ApiComposedOf] Method oneOf / anyOf / allOf for polymorphic responses (repeatable)
#[ApiShape] Resource, FormRequest, or DTO class Marks a class as using the static schema() method
#[ApiProperty] Property Documents a single property on a resource or DTO
#[ApiItems] Property Documents the item type inside an array property

Common Questions

Do I need to annotate every controller method?

No. Every route appears in the spec. Unannotated routes get an auto-generated summary from the controller and method name. Annotations make things accurate and readable but are never required.

What happens if I forget #[ApiResponse]?

Luminous adds a default 500 Internal Server Error response. Other responses are assumed to return a generic object. Add #[ApiResponse] to make the response schemas accurate.

My FormRequest has constructor dependencies. Will rules() work?

For most cases yes. Luminous instantiates the request without calling the constructor. If your rules() calls $this->user() or reads injected services, those calls fail silently and Luminous returns a bare schema. Restructure those rules to avoid request-time dependencies, or use #[ApiShape] to provide the schema explicitly.

Can I use a plain PHP class or DTO with #[ApiResponse]?

Yes. #[ApiResponse] accepts any class name. If the class has #[ApiShape] with a schema() method, or has #[ApiProperty] on its public properties, Luminous extracts the schema from it just like it would from a JsonResource.

Can I check the exported file, or build an SDK from it?

Yes. Export with luminous:export, then use normal OpenAPI tools. Redocly or Spectral can check the file. openapi-generator or Fern can build a client library. See Using the exported spec.


Credits

License

The MIT License (MIT). See LICENSE for details.


All versions of laravel-luminous with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/routing Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/validation Version ^11.0|^12.0|^13.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 botnetdobbs/laravel-luminous contains the following files

Loading the files please wait ...