jameron/invitations 问题修复 & 功能扩展

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

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

jameron/invitations

Composer 安装命令:

composer create-project jameron/invitations

包简介

Email invitations for bringing on new users to your applications.

README 文档

README

Send email based invites to potential new users.

This package is designed to enable web applications the feature of sending tokenized email invitations to potential new users. The invitation is a record on a invitations table, and once claimed is removed and a new user is added to the users table. This package was designed to work the the Admin Package and the Regulator Package

Setup instructions

  1. Add the package to yuor composer.json file

"jameron/invitations" : "*"

NOTE: Laravel 5.5 users can skip steps 2 and 3

  1. Add to your providers:
        Jameron\Invitations\InvitationsServiceProvider::class,
  1. Add to your Facades:
        'Invitations' => Jameron\Invitations\Facades\InvitationsFacade::class,
  1. Publish the migrations and config

    php artisan vendor:publish

  2. Run migrations

    pph artisan migrate

  3. If you want to tie related model data to your invitations you can set that in your config/invitations.php config file.

Make sure to add the Invitable Trait to the model you are relating to your invitations:

use Jameron/Invitations/Models/Traits/Invitable;

then in the class add that Trait

use Invitable;

If for example say you are inviting an user to manage a page you created for them. You have a table called pages, with foreign_key user_id currently set to null. You want the page user_id (nullable) set to the invited user once they claim their invite.

Your config would look like this:

    'related' => [
        'active' => false,
        'model' => \App\Page::class,
        'resource_route' => 'pages',
        'title' => 'Pages',
        'id_column' => 'id',
        'value_column' => 'title',
        'user_foreign_key' => 'user_id',
        'owner_foreign_key' => null
	],

When the invitation is claimed the page associated to the invitation will be updated with the users id.

  1. Add to your database/seeds/DatabaseSeeder.php
        $this->call(\Jameron\Import\database\seeds\InvitationsSeeder::class);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固