termiyanc / moactiontest
此包的最新版本(1.0.0)没有可用的许可信息。
用户订阅操作接口
1.0.0
2017-06-05 11:53 UTC
Requires
- twig/twig: 2.*
This package is not auto-updated.
Last update: 2024-09-29 04:49:20 UTC
README
该包实现用户订阅操作接口。
是 Laravel 5.2 的包,使用 Twig 2。请注意,Twig 2(撰写本指南时)需要 PHP 7。
要安装此包,需要在主应用程序上下文中
- 将
"termiyanc/moactiontest": "^1.0"
记录添加到 composer.json 文件的 require 部分,并执行composer update
命令,或者执行composer require termiyanc/moactiontest
命令。 - 在 app.php 配置文件的 providers 部分,指定
Termiyanc\Moactiontest\MoactiontestServiceProvider::class
。
安装包后,在主应用程序上下文中
- 执行命令
php artisan vendor:publish --provider=Termiyanc\Moactiontest\MoactiontestServiceProvider --force
。 - 执行命令
composer dumpautoload
。 - 使用命令
php artisan migrate --path=database/termiyanc/moactiontest/migrations
运行包的迁移。
迁移向数据库添加三个表
- termiyanc_moactiontest_users(用户)具有 name(名称)字段,
- termiyanc_moactiontest_subscriptions(订阅)具有 name(名称)字段,
- termiyanc_moactiontest_subscriptions_to_user(用户订阅)。
存在用于填充表的初始值。要在主应用程序上下文中填充表,请执行 php artisan db:seed --class=TermiyancMoactiontestDatabaseSeeder
命令。
该包实现的接口可通过 应用地址/termiyanc/moactiontest/users 访问。