Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sojebsikder/laravel-ecommerce-backend
E-commerce application with admin plugin architecture. This repository contains backend part. created using Laravel.
https://github.com/sojebsikder/laravel-ecommerce-backend
api ecommerce laravel plugin-architecture
Last synced: 3 days ago
JSON representation
E-commerce application with admin plugin architecture. This repository contains backend part. created using Laravel.
- Host: GitHub
- URL: https://github.com/sojebsikder/laravel-ecommerce-backend
- Owner: SojebSikder
- Created: 2022-12-27T16:36:19.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-05T12:59:04.000Z (3 months ago)
- Last Synced: 2024-08-19T23:07:16.021Z (3 months ago)
- Topics: api, ecommerce, laravel, plugin-architecture
- Language: Blade
- Homepage:
- Size: 1.97 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jeckmarket-backend
Laravel E-commerce application backend with plugin architecture.
# Features
- Sales management
- Order management
- Draft
- Abandoned checkouts
- Inventory management
- Customer management
- Roles management
- Promotions
- Coupons management
- Custom mail
- Content management
- Custom page
- Shipping
- Payment
- Order status
- Plugin systemAnd many more.
# Setup
Enable `zip` extension in `php.ini`
Setup stripe webhook:
`http://{domain_name}/payment/stripe_webhook`
# Install
Install Laravel packages
```
composer install
```# Running
```
php artisan serve
```## Listen stripe webhook locally for development
```bash
stripe listen --forward-to localhost:8000/api/payment/stripe_webhook
```Enable this in `php.ini` for microsoft login
```bash
;extension=sodium
```## Guide for plugin development
Create new plugin
- Create a new directory under `plugins` directory. Directory name should be same as your `package` name. And `package` name should be unique.
Example: plugins -> com.sojebsikder.demoplugin
- Inside your plugin directory, create `index.php` file.
- create class with convention like this: if your package name like this `com.sojebsikder.demoplugin` then your class name should be `Com_sojebsikder_demoplugin_plugin`
just replace dot(.) with underscore(\_) and add `_plugin`.
Here is an example of simple plugin:```php
package = "com.sojebsikder.helloworld";
$this->name = "Hello World";
$this->description = "Hello World Plugin";
$this->version = "1.0";
}public function onInit()
{
// add menu
$menu = [
'label' => 'Calculator (Plugin example)',
'name' => 'HelloWorld',
'icon' => 'bi bi-layout-split',
'route' => 'hello',
'order' => 4,
'parent' => 'sales',
];
$this->addMenu($menu);
}public function setupRoutes()
{
view()->addNamespace('my_views', __DIR__ . '/views');Route::get('hello', function () {
return view('my_views::index');
})->name('hello');
Route::post('hello', function (Request $request) {
$num1 = $request->input('num1');
$num2 = $request->input('num2');
$calc = $num1 + $num2;return back()->with('result', 'The sum is ' . $calc);
})->name('hello');
}public function onDelete()
{
}public function onActivate()
{
}public function onDeactivate()
{
}}
```