Download the PHP package nbdev/bersiv-api-response without Composer

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

Bersiv API Response

Bersiv API Response is a lightweight Laravel package for returning consistent JSON API responses.

It provides a semantic facade for common API response scenarios, including authentication, validation, data retrieval, process handling, external API failures, rate limits, AI answers, and system errors.

Instead of repeating response structures and messages in every controller, you can return a clear purpose-based response:

Name

Bersiv means response or answer in Kurdish.

The package name reflects its purpose: providing clear and consistent API responses for Laravel applications.

Purpose

The package is designed to make API responses:

Response Structure

Success Response

Success responses use success: true and place payloads under data.

Failure Response

Failure responses use success: false and place payloads under errors.

Empty payloads default to empty arrays instead of null.

Empty Payload Behavior

Empty payloads do not always mean failure.

List-style methods return 200 OK even when the result is empty:

Some methods treat an empty payload as a missing result:

Features

Requirements

Installation

Laravel package discovery registers the service provider automatically.

Basic Usage

Example response:

More Examples

Validation Failure

Example response:

Empty List Response

Example response:

Detail Not Found Response

Example response:

Available Facade Groups

Group Purpose
AI Return AI-generated answers or missing-answer failures.
Authentication Return login, logout, token, and unauthenticated responses.
Data Return detail, list, search, filter, range, and values responses.
External API Return responses for rejected or unavailable third-party APIs.
Process Return responses for accepted, finished, or rejected processes.
Rate Limit Return too many requests responses.
System Return internal server error responses.
Validation Return invalid inputs, invalid attributes, and captcha failures.

Translations

The package uses namespaced translation keys.

Publish translations with:

The files will be copied to:

Documentation

Code Quality

Run the test suite:

Check code style without changing files:

Fix code style automatically:

Run static analysis:

License

MIT


All versions of bersiv-api-response with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/http Version ^11.0
illuminate/support Version ^11.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 nbdev/bersiv-api-response contains the following files

Loading the files please wait ...