承接 webazin/referral 相关项目开发

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

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

webazin/referral

Composer 安装命令:

composer require webazin/referral

包简介

A Referral system for Laravel application

README 文档

README

A Referral System With Laravel

Installation

Via Composer to add the package to your project's dependencies:

composer require "webazin/referral @dev"

migrations

 php artisan migrate

Setup the model

Add ReferralTrait Trait to your User model.

use Webazin\Referral\ReferralTrait

class User extends Model
{
    use ReferralTrait;
}

Params

App\User::find(1)->getRefLink();

App\User::find(1)->setParentId($referralCode);
App\User::find(1)->getParent();

App\User::find(1)->setReferralCode();
// if this set --- set parent id 
App\User::find(1)->getReferralCodeFromCookie();

//relationships
App\User::find(1)->parent;
App\User::find(1)->child;

App\User::find(1)->referralCount();

License

Licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-03