Download the PHP package dragon-code/laravel-http-macros without Composer

On this page you can find all versions of the php package dragon-code/laravel-http-macros. 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-http-macros

HTTP Macros for Laravel

the dragon code laravel http macros

Stable Version Total Downloads Github Workflow Status

Installation

To get the latest version of HTTP Macros, simply require the project using Composer:

Configuration

If desired, you can publish the configuration file using the console command:

If your application already has a config/http.php file, then you can simply add a new macros key from the configuration file to it.

Here you can specify a list of your classes for registering macros. Macro classes must inherit from the abstract class DragonCode\LaravelHttpMacros\Macros\Macro.

You can also redefine macro names using an associative array. For example:

Usage

Available Methods

Request

Response

Method Listing

withLogger()

Adds the ability to log HTTP requests and responses.

This method will log HTTP requests and responses.

It is also possible to use your own handler, message formatting and path to the log file. To do this, you need to specify the desired channel name from the log file and define the necessary parameters in it.

For example:

toData()

The class instance will be returned.

Note

If a from method exists in a class, then it will be called to construct the object.

Compatible with Spatie Laravel Data.

toDataCollection()

The Illuminate\Support\Collection object or an object inherited from it will be returned.

Note

If a collect method exists in a class, then it will be called to construct the collection.

Compatible with Spatie Laravel Data.

Generate IDE Helper files

You can generate helper files for the IDE using the console command:

This will help your IDE suggest methods.

License

This package is licensed under the MIT License.


All versions of laravel-http-macros with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
dragon-code/support Version ^6.13
illuminate/http Version ^10.0 || ^11.0
illuminate/support Version ^10.0 || ^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 dragon-code/laravel-http-macros contains the following files

Loading the files please wait ....