PHP code example of developertugrul / entegra-api

1. Go to this page and download the library: Download developertugrul/entegra-api 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/ */

    

developertugrul / entegra-api example snippets


protected $routeMiddleware = [
    // ...
    'checkEntegraToken' => \Developertugrul\EntegraApi\Middleware\CheckToken::class,
];

use Developertugrul\EntegraApi;

$entegra = new EntegraApi();


$products = $entegra->products()->get();

// ID ile ürün çekme
$product = $entegra->products()->get(1);

// api_sync parametresi ile sadece api_sync=1 olan ürünleri çekme
$products = $entegra->products()->getWithParameter(1);


$categories = $entegra->getCategories();

$brands = $entegra->getBrands();

$orders = $entegra->getOrders();
bash
php artisan vendor:publish --provider="Developertugrul\EntegraApi\EntegraApiServiceProvider" --tag="migrations"
php artisan migrate