PHPackages                             justbetter/laravel-magento-products - 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. justbetter/laravel-magento-products

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

justbetter/laravel-magento-products
===================================

Package to store product data in a local DB

1.9.0(2w ago)1655.7k↓11%34MITPHPPHP ^8.3CI passing

Since Sep 20Pushed 2w ago3 watchersCompare

[ Source](https://github.com/justbetter/laravel-magento-products)[ Packagist](https://packagist.org/packages/justbetter/laravel-magento-products)[ RSS](/packages/justbetter-laravel-magento-products/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (27)Versions (18)Used By (4)

Magento Products
================

[](#magento-products)

 [![Tests](https://camo.githubusercontent.com/bffa843f027a04c67b9aa273b1c632b659ff279c8d8b0ca9e3864dd60323c92c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a7573746265747465722f6c61726176656c2d6d6167656e746f2d70726f64756374732f74657374732e796d6c3f6c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/justbetter/laravel-magento-products) [![Analysis](https://camo.githubusercontent.com/3090ba2fc6954acb4326bd6755e5faabe8d74396de28b439273f900c21f31d7e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a7573746265747465722f6c61726176656c2d6d6167656e746f2d70726f64756374732f616e616c7973652e796d6c3f6c6162656c3d616e616c79736973267374796c653d666c61742d737175617265)](https://github.com/justbetter/laravel-magento-products) [![Total downloads](https://camo.githubusercontent.com/49409bfbc1a839b98b9741756e49cfd9bf2a78d740ef1ccef6150e67fb54e43d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a7573746265747465722f6c61726176656c2d6d6167656e746f2d70726f64756374733f636f6c6f723d626c7565267374796c653d666c61742d737175617265)](https://github.com/justbetter/laravel-magento-products)

This package tracks if products exist in Magento by storing the status locally in the DB. We developed this to prevent multiple calls when multiple packages need to check product existence in Magento.

Installation
------------

[](#installation)

Require this package:

```
composer require justbetter/laravel-magento-products
```

Add the following to your schedule to automatically search for products in Magento.

```
$schedule->command(\JustBetter\MagentoProducts\Commands\CheckKnownProductsExistenceCommand::class)->twiceDaily();
$schedule->command(\JustBetter\MagentoProducts\Commands\DiscoverMagentoProductsCommand::class)->daily();
```

Important

This package requires Job Batching

Usage
-----

[](#usage)

### Checking if a product exists in Magento

[](#checking-if-a-product-exists-in-magento)

You can use this package to determine if products exist in Magento. For example:

```
$exists = app(\JustBetter\MagentoProducts\Contracts\ChecksMagentoExistence::class)->exists('sku')
```

If it does not exist the sku will still be stored in the database. The `\JustBetter\MagentoProducts\Commands\CheckKnownProductsExistenceCommand` command will automatically check these known products for existence.

### Retrieving product data

[](#retrieving-product-data)

You can use this package to retrieve product data. This data will be saved in the database and automatically retrieved when it is older than X hours. You can configure the amount of hours in the config file For example:

```
$exists = app(\JustBetter\MagentoProducts\Contracts\RetrievesProductData::class)->retrieve('sku')
```

### Deletion safeguard

[](#deletion-safeguard)

To prevent accidental deletion of products a safeguard is built in which prevents the deletion event firing if the number of products to be deleted exceeds the configured threshold. This threshold can be configured in the configuration file and is in percentages. For example, a value of `0.1` (10%) will stop deletions if 11 products are deleted of 100 total.

Events
------

[](#events)

When your application discovers new products in Magento you should dispatch one of the following events:

`\JustBetter\MagentoProducts\Events\ProductDiscoveredEvent` containing a single sku.

When a single product or multiple products appear in Magento, an event is dispatched:

`\JustBetter\MagentoProducts\Events\ProductCreatedInMagentoEvent` containing a single sku.

Quality
-------

[](#quality)

To ensure the quality of this package, run the following command:

```
composer quality
```

This will execute three tasks:

1. Makes sure all tests are passed
2. Checks for any issues using static code analysis
3. Checks if the code is correctly formatted

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Vincent Boon](https://github.com/VincentBean)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance97

Actively maintained with recent releases

Popularity38

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 90.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~85 days

Recently: every ~161 days

Total

17

Last Release

16d ago

PHP version history (3 changes)1.0.0PHP ^8.0

1.2.0PHP ^8.1

1.6.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d00b3f55cd4ae8b8cfb001a644ed6c7a1127a956c24375bcfe16ce12bd89bed?d=identicon)[justbetter](/maintainers/justbetter)

---

Top Contributors

[![VincentBean](https://avatars.githubusercontent.com/u/3906942?v=4)](https://github.com/VincentBean "VincentBean (57 commits)")[![ramonrietdijk](https://avatars.githubusercontent.com/u/85165272?v=4)](https://github.com/ramonrietdijk "ramonrietdijk (4 commits)")[![cosmicvibes](https://avatars.githubusercontent.com/u/286965?v=4)](https://github.com/cosmicvibes "cosmicvibes (2 commits)")

---

Tags

laravelmagento

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/justbetter-laravel-magento-products/health.svg)

```
[![Health](https://phpackages.com/badges/justbetter-laravel-magento-products/health.svg)](https://phpackages.com/packages/justbetter-laravel-magento-products)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11223.5M33](/packages/anourvalar-eloquent-serialize)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3417.0k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
