storessuite / wix
Wix integration for Laravel apps.
0.0.40
2024-12-29 15:36 UTC
Requires
- illuminate/bus: ^11.36
- illuminate/database: ^11.33
- illuminate/queue: ^11.36
- illuminate/routing: ^11.36
This package is auto-updated.
Last update: 2025-05-29 01:49:19 UTC
README
Wix is a Laravel package to integrate Wix. It provides:
- SDK for interacting with Wix API.
- Database for representing Wix resources in your app.
Github
https://github.com/storessuite/wix.git
Implementation
composer require storessuite/wix
php artisan migrate
- Setup
.env
WIX_APP_ID=<Your wix app's ID>
WIX_CLIENT_SECRET=<Your wix app's client secret>
- Add a route
${APP_URL}/wix/oauth/complete
. You will receivestate
andwixSiteId
at this endpoint after installation is complete. This can be a good place to create a connection between wix site and authenticated user.
Wix Contract
You should create a class by implement WixContract and bind WixContract with the class. This is required when wix installation is complete and Wix package needs to access app's services to complete installation. Like creating users for wix site.
Requirements
- PHP 8.3 or higher
- Laravel 11 or higher
Contribution
Conventions
Database table naming convention
_id
= ID of a resource on Wix. For example: ID of Wix product is stored as_id
inwix_products
table.- Append all tables with
wix_
. This will group all Wix related tables together. - Pivot tables have related tables names in singular form. For example:
wix_site_wix_site_contributor
is a pivot table forwix_sites
andwix_site_constributors
tables. - Tables names should be plural word of the resource. For example:
wix_products
. For certain words, there is no trailings
. For example: tablemedia
should represent all media related data.
Model convention
- All relations should ommit the word
Wix
. For example:variants()
defines a relationship forWixVariant
.