Created
          August 2, 2017 20:53 
        
      - 
      
 - 
        
Save isaqueprofeta/f5707b450ea97bbca1837189418b7b9d to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | use GuzzleHttp\Client; | |
| class yourController extends Controller { | |
| public function saveApiData() | |
| { | |
| $client = new Client(); | |
| $res = $client->request('POST', 'https://url_to_the_api', [ | |
| 'form_params' => [ | |
| 'client_id' => 'test_id', | |
| 'secret' => 'test_secret', | |
| ] | |
| ]); | |
| $result= $res->getBody(); | |
| dd($result); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment