twom/laravel-axios

There is no license information available for the latest version (0.6) of this package.

axios request in laravel

0.6 2020-05-19 19:40 UTC

This package is auto-updated.

Last update: 2024-09-06 00:28:23 UTC


README

Installation:

composer require twom/laravel-axios

Requests methods:

Options:

Mor methods:

Examples:

$data = Axios::post("http://your-url.com/...",  
 [  
	 "name" => "ali",  
 ], 
 [  
	 "header" => [  
		  "Authorization" => "any"  
	  ],  
 ]) 
 ->setContent()  
 ->go()  
 ->output('json');

Note: convert output to json.

you can make a request like this:

$axios = Axios::make([  
		  "url" => $url,  
		  "method" => "post",
		]);