Download the PHP package youngmayor/app-response without Composer

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

Laravel App Response

Latest Version on Packagist Total Downloads GitHub Actions

This is a simple laravel package for providing a unified response for our application.

Installation

You can install the package via composer:

Usage

The package uses auto discovery hence if you use Laravel 5.5 or above, installing the package automatically registers it in your application.

However, if you use Laravel 5.4 or below you will need to add the below snipet to your config/app.php to register the Service Provider and alias

The package can now be added to our controller actions using one of the methdos below

  1. Injecting the API response helper

  2. Injecting the Web response helper

  3. Injecting the automatic response helper

  4. Using the package facade

  5. Using the helper function

Response Types

The package provides two forms of responses, Web and API. It also provides an Auto responder which essentially responds as API if Accept: application/json header exists and responds as Web if the header is missing.

API Response

This returns a JSON response

Example

Web Response

This renders a web page as the response. An example is attached below

Web response can be completed turned off by making setting the app-response.render-web-as-view configuration to false. The configuration file can be published using the below command

The web response can also be customised. To publish the views run the below code on the root of your application terminal

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.


All versions of app-response with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
illuminate/support Version ~6|~7|~8|~9
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 youngmayor/app-response contains the following files

Loading the files please wait ....