PHP code example of grebo87 / laravel-vtex-api
1. Go to this page and download the library: Download grebo87/laravel-vtex-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/ */
grebo87 / laravel-vtex-api example snippets
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Grebo87\LaravelVtexApi\Api\Catalog\Category;
class SomeControler extends Controller
{
public function index()
{
return (new Category)->getCategoryTree();
//or
$category = new Category;
return $category->getCategoryTree();
}
}
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Grebo87\LaravelVtexApi\Facades\Category;
class SomeControler extends Controller
{
public function index()
{
return Category::getCategoryTree();
}
}