jawabapp/community
Composer 安装命令:
composer require jawabapp/community
包简介
jawab community
关键字:
README 文档
README
Installation
You can install the package via composer:
composer require jawabapp/community
Usage
User.php Model
USE Jawabapp\Community\Contracts\CommunityAccount; use Jawabapp\Community\Traits\HasCommunityAccount; class User extends Authenticatable implements CommunityAccount { use HasCommunityAccount; //... }
implement those methods from CommunityAccount interface.
use Illuminate\Database\Eloquent\Builder; class User extends Authenticatable implements CommunityAccount { public static function getLoggedInUser() { //... } public function getAccount($account_id) { //... } }
Publish Package assets
Run follwoing command on Terminal
php artisan vendor:publish --provider=Jawabapp\Community\CommunityServiceProvider
alter community.php config file adding user class and route prefix
[
'user_class' => \App\User::class, // user class
'route' => [
'prefix' => 'package', // route prefix
'middleware' => 'web', // route middlware
]
,
//...
]
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email trmdy@hotmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 576
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-07-25