Download the PHP package ebsp/resting without Composer

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

Resting

Typed REST resources, validation, and OpenAPI generation for Laravel.

Resting is an alternative to Laravel's built-in API Resources, built around typed field objects. Each resource property is a strongly-typed Field that knows how to parse, validate, and format itself — so request payloads, validation rules, response shapes, and OpenAPI schemas all derive from a single source of truth.

Why Resting?

Requirements

Installation

The service provider is auto-registered. Optionally publish the config:

Quickstart

Define a resource

Validate and parse a request

Resource implements Laravel's Jsonable, so returning the resource is enough — Laravel encodes it as JSON automatically. Invalid input throws Illuminate\Validation\ValidationException with nested error paths.

Build a response

Or map a collection:

Field types

Field Description
StringField Strings, with trim(), upper(), lower(), stripWhitespace(), transform() transformers
IntField Integers, with numeric validators (min, max, between, …)
NumberField Floats / decimals
BoolField Booleans (parses true/false, 1/0, yes/no)
EnumField PHP backed enums (string or int)
CarbonField Date-times (returns CarbonImmutable)
CarbonPeriodField Date ranges as CarbonPeriod
TimeField Time-of-day without date
ArrayField Homogeneous arrays with element-type validation
ResourceField Single nested resource
ResourceArrayField Array of nested resources
RawField Pass-through, no parsing or validation

All fields support required(), nullable(), forbidden(), and omittedDefault().

Conditional validation

Predicate factories let you express rules like "shippingAddress is required when requiresShipping is true":

Polymorphic resources

UnionResource discriminates between resource shapes by a tag field:

DynamicResource lets you build resources at runtime:

OpenAPI generation

Resting can produce an OpenAPI 3 document from your registered routes:

Annotate routes with helper macros:

Resources, query parameters, and route metadata are turned into components.schemas, components.parameters, and paths automatically.

Documentation

Full documentation, including all field types, validation predicates, the marshaller, and OpenAPI generation, is available at ebsp.github.io/resting (coming soon).

Testing

Contributing

Issues and pull requests are welcome. Please run the test suite before submitting a PR.

License

Resting is open-sourced software licensed under the MIT license.


All versions of resting with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^11.0|^12.0
ext-json Version *
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 ebsp/resting contains the following files

Loading the files please wait ...