PHP code example of wearefar / laravel-ecommerce

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

    

wearefar / laravel-ecommerce example snippets


return [
];

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use WeAreFar\Ecommerce\HasOrders;
use WeAreFar\Ecommerce\OrderItem;

class Product extends Model implements OrderItem
{
    use HasOrders;
}

protected $except = [
    'stripe/webhook',
];

// WIP
bash
php artisan vendor:publish --provider="WeAreFar\Ecommerce\EcommerceServiceProvider" --tag="migrations"
php artisan migrate
bash
php artisan vendor:publish --provider="WeAreFar\Ecommerce\EcommerceServiceProvider" --tag="config"
bash
php artisan vendor:publish --provider="WeAreFar\Ecommerce\EcommerceServiceProvider" --tag="views"