PHP code example of jsartisan / shopkart-laravel

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

    

jsartisan / shopkart-laravel example snippets


# app.php

'providers' => [
    // ..
    JSArtisan\Shopkart\ShopkartServiceProvider::class,
    
]

# app.php

'aliases' => [
    // ..
    'Shopkart'  => JSArtisan\Shopkart\Facades\Shopkart::class,
    
]

# services.php

	// ..
	'amazon' => [
		'client_id'     	=>  'your_amazon_client_id',
		'client_secret' 	=>  'your_amazon_client_secret/',
		'tag'           	=>  'your_amazon_id_tag',
		'country'       	=>  'your_country_code'
	],
	
	'flipkart' => [
		'client_id'     	=>  'your_flipkart_client_id',
		'client_secret' 	=>  'your_flipkart_client_secret',
		'country'       	=>  '',
		'tag'           	=>  ''
	],

	Shopkart::with('amazon')->search('PS3','Electronics');

	Shopkart::with('flipkart')->search('PS3',5);