Download the PHP package satheez/api-response without Composer

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

Laravel API Response

Consistent JSON API response helpers for Laravel applications.

[![Tests](https://github.com/satheez/laravel-api-response/actions/workflows/tests.yml/badge.svg)](https://github.com/satheez/laravel-api-response/actions/workflows/tests.yml) [![Packagist Version](https://img.shields.io/packagist/v/satheez/laravel-api-response.svg)](https://packagist.org/packages/satheez/laravel-api-response) [![Total Downloads](https://img.shields.io/packagist/dt/satheez/laravel-api-response.svg)](https://packagist.org/packages/satheez/laravel-api-response) [![PHP](https://img.shields.io/badge/PHP-8.3%2B-blue)](https://www.php.net) [![Laravel](https://img.shields.io/badge/Laravel-12%20%7C%2013-red)](https://laravel.com) [![License](https://img.shields.io/packagist/l/satheez/laravel-api-response.svg)](LICENSE.md)

Laravel API Response wraps every JSON response in a standard { success, message, data, errors, meta } envelope. Helper functions, a facade, response macros, and a fluent builder give you multiple ways to produce the same consistent output from controllers, jobs, middleware, or anywhere in your application.

The package is intentionally small and does not manage routing, authentication, or business logic. It formats the response body that moves through those layers.

Highlights

Requirements

Requirement Version
PHP ^8.3
Laravel ^12.0 or ^13.0

Installation

Optionally publish the config and translations:

See Installation for the full setup flow.

Quick Start

Equivalent response styles:

Response Envelope

Every response uses the same base structure:

Available Methods

Method Status Purpose
success($data, $message, $status, $headers, $meta) Custom General success response
created($data, $message, $headers, $meta) 201 Resource created response
updated($data, $message, $headers, $meta) 200 Resource updated response
stored($data, $message, $headers, $meta) 200 Alias for updated/stored responses
deleted($data, $message, $headers, $meta) 200 Resource deleted response
error($message, $status, $errors, $headers, $meta) Custom General error response
validationError($errors, $message, $headers, $meta) 422 Validation error response
unauthorized($message) 401 Unauthenticated response
forbidden($message) 403 Unauthorized action response
accessDenied($message) 403 Alias for forbidden responses
notFound($message) 404 Missing resource response
invalidRequest($message) 400 Bad request response
somethingWentWrong($message) 500 Server error response
exception($exception, $message, $status) Custom Exception response
resource($resource, $message, $status, $headers, $meta) Custom JSON resource response
collection($collection, $resourceClass, $message, $status, $headers, $meta) Custom Resource collection response
paginated($paginator, $resourceClass, $message, $status, $headers, $meta) Custom Paginated resource response

Documentation

Guide Covers
Installation Composer install, publishing config and translations, verifying setup
Usage guide All response methods, fluent builder, resources, pagination, response envelope
Configuration Messages, extra fields, resolvers, macros, and exception config options
Architecture Core classes, response flow, macro registration, and exception rendering pipeline
Errors and exception rendering Error helpers, exception mappings, JSON-only rendering, message exposure
Macros Macro registration, collision behavior, custom names, disabling macros
Examples and recipes CRUD controller, validation, pagination, dynamic extra fields, fluent builder
FAQ Common questions about envelope shape, config caching, API versioning, and more
Upgrade guide Migrating from satheez/api-response to satheez/laravel-api-response

Contributing

See CONTRIBUTING.md for local setup, coding standards, and pull request guidelines.

Changelog

All notable changes are documented in CHANGELOG.md.

Testing This Package

License

Laravel API Response is open-sourced software licensed under the MIT license.


All versions of api-response with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
spatie/laravel-package-tools Version ^1.92
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 satheez/api-response contains the following files

Loading the files please wait ...