PHP code example of deniztezcan / laravel-sendcloud-shipping

1. Go to this page and download the library: Download deniztezcan/laravel-sendcloud-shipping 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/ */

    

deniztezcan / laravel-sendcloud-shipping example snippets


    'providers' => [
    	//other things here

    	DenizTezcan\SendCloud\SendCloudServiceProvider::class,
    ];

    'aliases' => [
    	//other things here

    	'SendCloud' => DenizTezcan\SendCloud\Facades\SendCloud::class,
    ];



use DenizTezcan\SendCloud\Entities\Customer;
$customer = new Customer([
	'name' => 'John Doe',
	'company_name' => 'ACME Bank',
	'street_address' => 'Main St',
	'street_address_nr' => '123',
	'city' => 'Anytown',
	'postal_code' => '12345',
	'country' => 'DE',
]);

$parcel = SendCloud::createSingleParcel($customer, 89, 'ORDERNO');
SendCloud::getPDFFromSingleParcel($parcel);

php artisan vendor:publish --provider="DenizTezcan\SendCloud\SendCloudServiceProvider"