A Laravel package to build a simple ecommerce.
You can install the package via composer:
composer require wearefar/laravel-ecommerce
You can publish and run the migrations with:
php artisan vendor:publish --provider="WeAreFar\Ecommerce\EcommerceServiceProvider" --tag="migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --provider="WeAreFar\Ecommerce\EcommerceServiceProvider" --tag="config"
This is the contents of the published config file:
return [
];
Add the path to the template files in your tailwind.config.js
file.
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./vendor/wearefar/ecommerce/resources/views/**/*.blade.php',
...
],
...
}
You can customize the views by exporting them to your resources/views/vendor
directory using the vendor:publish
command:
php artisan vendor:publish --provider="WeAreFar\Ecommerce\EcommerceServiceProvider" --tag="views"
To connect the shop with a model, the model must implement the following interface and trait:
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
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you've found a bug regarding security please mail victor@wearefar.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.