1 Star 5 Fork 1

Neilyoz/laravel-swoole-chat

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
User.php 884 Bytes
一键复制 编辑 原始数据 按行查看 历史
Neilyoz 提交于 2019-11-27 16:10 +08:00 . 及时通讯部分基本完成
<?php
namespace App;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password', 'head_pic'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token', 'pivot'
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
public function friends()
{
return $this->belongsToMany(User::class, 'friends', 'owner_id', 'relation_id');
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/neilyoz/laravel-swoole-chat.git
git@gitee.com:neilyoz/laravel-swoole-chat.git
neilyoz
laravel-swoole-chat
laravel-swoole-chat
master

搜索帮助