donnicias / nav_ip
这是一个用于管理微软Dynamics Nav与Laravel应用程序之间集成的完整包。它使得集成变得轻而易举。
v1.0.5
2019-01-24 16:18 UTC
Requires
- php: >=5.6.0
- illuminate/support: ^5.0
Requires (Dev)
- phpunit/phpunit: ~5.7|~6.2
This package is auto-updated.
Last update: 2024-09-25 07:50:08 UTC
README
这是一个用于微软Dynamics Nav与Laravel应用程序之间集成的Laravel包。该包允许用户通过Nav API执行CRUD操作。
安装
通过Composer引入此包。
此脚本将默认配置文件复制到项目根目录的config文件夹中。现在继续引入此包。
常规安装
运行composer require donnicias/nav_ip以获取包的最新稳定版本。
Laravel
当使用Laravel 5.5+时,该包将自动注册。对于Laravel 5.4及以下版本,请在您的config/app.php中包含服务提供者和其别名。
'providers' => [ \donnicias\nav_ip\Provider\NavIPServiceProvider::class ], 'aliases' => [ 'Nav' => \donnicias\nav_ip\Facades\Nav::class ],
使用以下命令发布包特定配置:
php artisan vendor:publish
配置
该包允许您指定配置。配置是必需的。
return [
/**
|--------------------------------------------------------------------------
| Defaults
|--------------------------------------------------------------------------
|
| The following are the default configs. You can change the configs as needed.
| Mode: Defines the default auth mode to be used
| Sync_Field: Defines the sync field to be marked on Nav side when sync is successful
| Default_Sync_Value: This should be a boolean value. It states how the Sync_Field will be marked when sync is
| successful
*/
'Mode'=>'NTLM',
'Sync_Field'=>'Web_Sync',
'Default_Sync_Value'=>true,
/**
|--------------------------------------------------------------------------
| Authentication Mode
|--------------------------------------------------------------------------
|
| These are the auth modes that can be used with the package. You can configure
| as many as needed. Two have been setup for you.
|
| BaseURL: Determines Nav Base URL
| Username: This is the username used to authenticate the transaction request to Nav
| Domain: For ntlm, include the user domain
| Password: This is the password to be used with the username for authentication to Nav
| Company: The company name as setup in Nav
|
*/
'Auth_Mode' => [
'NTLM' => [
'BaseURL' => 'http://desktop-e82non2:8047/NavDev/WS/',
'Company' => 'LAW%20SOCIETY%20OF%20KENYA',
'Username' => 'Don',
'Domain' => 'DESKTOP-E82NON2',
'Password' => '7231'
],
'BASIC' => [
'BaseURL' => '',
'Company' => '',
'Username' => '',
'Password' => ''
],
],
];
目前该包仅支持NTLM身份验证。
使用方法
以下展示了如何使用此包
namespace App\Http\Controllers; use donnicias\nav_ip\Facades\Nav; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; class IntegrationController extends Controller { public function index(){ $payments = Nav::Read(null,'Payments',null,1); $blob = Nav::Read(['returnString'=>'','payload'=>'110415','service'=>'RENEWALINVOICE'],'BlobHandling','ProcessBlobs',null); } }
许可证
此包是开源软件,遵循MIT许可证。