定制 justbetter/laravel-akeneo-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

justbetter/laravel-akeneo-client

最新稳定版本:1.5.0

Composer 安装命令:

composer require justbetter/laravel-akeneo-client

包简介

A Laravel package for the Akeneo API

README 文档

README

Package banner

Laravel Akeneo Client

Tests Coverage Analysis Total downloads

Connect to your Akeneo instance using the official akeneo/api-php-client. This package will ease configuration, dependency injection and testing for Laravel.

It also has an endpoint available to receive Akeneo events, if enabled.

Example usage

<?php use JustBetter\AkeneoClient\Client\Akeneo; public function __construct(Akeneo $akeneo) { $product = $akeneo->getProductApi()->get('1000'); }

Installation

Install the composer package.

composer require justbetter/laravel-akeneo-client

By default, this package will require the latest version of akeneo/api-php-client. You should take a look at the compatibility table to see what version you need for your project.

composer require akeneo/api-php-client "^9.0"

Setup

Optionally, publish the configuration of the package.

php artisan vendor:publish --provider="JustBetter\AkeneoClient\ServiceProvider" --tag=config

Configuration

Add the following values to your .env file.

AKENEO_URL= AKENEO_CLIENT_ID= AKENEO_SECRET= AKENEO_USERNAME= AKENEO_PASSWORD= AKENEO_EVENT_SECRET= 

Events

If you have enabled the event subscription in Akeneo you will be to listen to these events.

The event webhook is /akeneo/event. This can be configured using the prefix in your akeneo config file.

All events are available.

<?php use Illuminate\Support\Facades\Event; use JustBetter\AkeneoClient\Events\ProductCreatedEvent; Event::listen(function (ProductCreatedEvent $event): void { // });

Testing

This package makes testing and mocking Akeneo calls very easily.

<?php use Illuminate\Support\Facades\Http; use JustBetter\AkeneoClient\Client\Akeneo; // This will fake Akeneo credentials and a sign in. Akeneo::fake(); // Fake the specific call you will be using Http::fake([ 'akeneo/api/rest/v1/products/1000' => Http::response([ 'identifier' => '1000', 'enabled' => true, 'family' => 'hydras', 'categories' => [], 'groups' => [], 'parent' => null, 'values' => [ 'name' => [ [ 'locale' => 'nl_NL', 'scope' => 'ecommerce', 'data' => 'Ziggy', ], ], ], ]), ]); // Get the product with the fake response $response = $akeneo->getProductApi()->get('1000');

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

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

Package footer

统计信息

  • 总下载量: 25.64k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 17
  • 点击次数: 3
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 17
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固