承接 mcris112/billable 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

mcris112/billable

最新稳定版本:v0.3

Composer 安装命令:

composer require mcris112/billable

包简介

Laravel Package for handling Billing, Orders, Subscriptions manager - local

README 文档

README

Laravel - Billable is a project to can accept a variety of payments methods and based on currency If u have some recommendations, please do.

  • Author: MCris112
  • Vendor: mcris112
  • Package: laravel-billable
  • Version: 1.x
  • PHP Version: 8.1+
  • Laravel Version: 10.x

Table of Contents

  1. Installation
  2. Usage
    1. Order
      1. Get
      2. Get
      3. Create
      4. Item
      5. toResource()

Payment Supports

  • MercadoPago
  • Paypal

Installation

Install the package with the command Composer:

composer require mcris112/laravel-billable

Usage

//Return the Order cached and ready to use
$order = Order::get('9b3731fd-290d-4fbd-ab99-3d675080c37f');

// This can use it to set as api response
$order->toResource();

ORDER

Order::class is a Model from laravel but with some additional functions, and It's used for creating Orders or use it into payment processing

Functions

Order::get()

This static method is called when u want to retrieve the Order

$order = Order::get('9b3731fd-290d-4fbd-ab99-3d675080c37f');

Why do I have to use Order::get($id) instead of Order::whereId($id)->get() if It's a laravel model class?

Internally this method uses whereId() but this is returned as cached from DB

/**
* Return the Order cached forever
* @param string $id
* @return self
* @throws OrderNotFoundException
*/
public static function get(string $id): self
{
    ...
}
Order::create()
Order::Item()
$order->toResource()

Relations

Items
User
Statuses

Contributing

License

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-02