PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 13, 2022

[FIXED] Getting Values Using API and Laravel

 January 13, 2022     laravel, php     No comments   

Issue

I make my first project with API. I need add this to my project: https://dokumentacja-inpost.atlassian.net/wiki/spaces/PL/pages/18153479/1.7.3+Shipment+Tracking

I use in my project Laravel 8.

I make composer require michalbiarda/shipx-php-sdk

And I added this code to my controller"

$status = new \MB\ShipXSDK\Method\Tracking\Read;
$status->tracking_number = 123;
dd($status);

but its return:

MB\ShipXSDK\Method\Tracking\Read {#1599 ▼
  +"tracking_number": 123
}

Not status :(

How can I get status from inputs by this API?

Please help me


Solution

Probably you need to hit a curl request with required attributes. Screen shot of the following curl

You can dd() the response of the curl response and surely you ll get the status.



Answered By - Deepak Thakur
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing