PHP code example of anvari182 / laravel-tracking-more
1. Go to this page and download the library: Download anvari182/laravel-tracking-more library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
anvari182 / laravel-tracking-more example snippets
use Anvari182\TrackingMore\TrackingMoreRequests\Tracking;
use Anvari182\TrackingMore\TrackingMoreRequests\Courier;
use Anvari182\TrackingMore\Data\TrackingData;
public function __construct(private Tracking $tracking, private Courier $courier)
{
}
public function index()
{
// Create a tracking
$this->tracking->createTracking(['tracking_number' => 'xyz123', 'courier_code' => 'ups']);
// Get all couriers
$couriers = $this->courier->getAllCouriers();
}
use Anvari182\TrackingMore\Facades\TrackingMore;
// Create a tracking
TrackingMore::tracking()->createTracking(['tracking_number' => 'xyz123', 'courier_code' => 'ups'])
// Get all couriers
$couriers = TrackingMore::courier()->getAllCouriers();