PHPackages                             polarizetech/wixable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. polarizetech/wixable

ActiveLibrary[Database &amp; ORM](/categories/database)

polarizetech/wixable
====================

Automatically imports data collection items from the Wix Headless CMS to your Laravel models

0.0.3(2y ago)0159MITPHPPHP ^8.2

Since Apr 13Pushed 2y agoCompare

[ Source](https://github.com/polarizetech/wixable)[ Packagist](https://packagist.org/packages/polarizetech/wixable)[ RSS](/packages/polarizetech-wixable/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (3)Used By (0)

### Wixable

[](#wixable)

Automatically imports (one-way sync from Wix CMS) data items from Wix Headless CMS to your app's database.

#### Installation

[](#installation)

Install package: `composer required polarize/wixable`

Add your Wix API credentials to your environment file:

```
WIX_API_KEY="..."
WIX_ACCOUNT_ID="..."
WIX_SITE_ID="..."

```

Publish the migration for Wixables "wixable\_data\_items" table: `php artisan vendor:publish --tag=wixable.migrations`

Run migrations: `php artisan migrate`

#### Setup your models

[](#setup-your-models)

Add a new class to your app/Models folder that extends `Wixable\Wixable`. Repeat for each of the **Data Collections** in Wix that you would like to keep synced (the model name should be the singular version of the data collection's ID).

For example, in the case of my "Breakfast Sandwich Reviews" collection in Wix (witch might have the **Data Collection ID** of "BreakfastSandwichReviews"), I would do the following:

1. Run the artisan make command: `php artisan make:model BreakfastSandwichReview`
2. Update the new model to extend the `Wixable\Wixable` abstract class:

```
