PHP code example of neimarperez / laravel-woocommerce
1. Go to this page and download the library: Download neimarperez/laravel-woocommerce 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/ */
neimarperez / laravel-woocommerce example snippets
php artisan vendor:publish --tag=woocommerce
use Codexshaper\WooCommerce\Facades\Product;
public function products()
{
return Product::all();
}
public function product( Request $request )
{
$product = Product::find($request->id);
}
use Codexshaper\WooCommerce\Facades\Customer;
public function customers()
{
return Customer::all();
}
public function customer( Request $request )
{
$customer = Customer::find($request->id);
}
use Codexshaper\WooCommerce\Facades\WooCommerce;
public function products()
{
return WooCommerce::all('products');
}
public function product( Request $request )
{
$product = WooCommerce::find('products/'.$request->id);
}
public function orders()
{
return WooCommerce::all('orders');
}
public function order( Request $request )
{
$order = WooCommerce::all('orders/'.$request->id);
}
public function customers()
{
return WooCommerce::all('customers');
}
public function customer( Request $request )
{
$customer = WooCommerce::all('customers/'.$request->id);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.