aleahy/laravel-saasu-connect 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

aleahy/laravel-saasu-connect

最新稳定版本:1.1

Composer 安装命令:

composer require aleahy/laravel-saasu-connect

包简介

Laravel wrapper for SaasuConnect

README 文档

README

A Laravel wrapper for SaasuConnect

Overview

This package can be imported into laravel to be able to make requests on the Saasu API.

Installation

composer require aleahy/laravel-saasu-connect

Then publish the config file to be able to access your saasu username, password and File ID.

php artisan vendor:publish --provider="Aleahy\LaravelSaasuConnect\ServiceProvider" --tag=config

Usage

Use the SaasuAPI facade to be able to make the calls on the Saasu API.

use Aleahy\LaravelSaasuConnect\Facade\SaasuAPI;
use Aleahy\SaasuConnect\Entities\Invoice as SaasuInvoice;

SaasuAPI::findEntity(SaasuInvoice::class, [
  'AmountOwed' => 490.0
]);

Available Methods

The following methods currently exist:

findEntity - Finds the provided entity with the search attributes. Returns a collection of entities.

insertEntity - Makes a post request for the given entity with the provided attributes.

getEntity - Returns the specific entity with the given id.

getAllEntities - Returns all the entities in a single array.

Available Entities

  • Company
  • Contact
  • Invoice

HasSaasuEntity Trait

Models can also be associated with a saasu id. This trait adds a SaasuEntity hasOne relationship which holds the saasu ID.

Adding the trait HasSaasuEntity to your models assigns them a model to manually track the saasu id.

Installation

Add the trait HasSaasuEntity to your model.

You will also need to publish the migration to store the saasu id.

php artisan vendor:publish --provider="Aleahy\LaravelSaasuConnect\ServiceProvider" --tag=migrations

Available methods

setSaasuID - set the value of the saasu id for the model.

getSaasuID - returns the value of the saasu id for the model.

hasSaasuID - returns true or false, depending on if the saasuID value has been set.

统计信息

  • 总下载量: 482
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-03-20