Files
UNIT3D-Community-Edition/app/Invite.php
2017-12-12 21:50:27 -05:00

54 lines
1.0 KiB
PHP
Executable File

<?php
/**
* NOTICE OF LICENSE
*
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
* The details is bundled with this project in the file LICENSE.txt.
*
* @project UNIT3D
* @license https://choosealicense.com/licenses/gpl-3.0/ GNU General Public License v3.0
* @author BluCrew
*/
namespace App;
use Illuminate\Database\Eloquent\Model;
class Invite extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = "invites";
/**
* Mass assignment fields
*
*/
protected $fillable = [
'user_id', 'email', 'code', 'expires_on', 'accepted_by', 'accepted_at', 'custom'
];
/**
* Belongs to User
*
*
*/
public function sender()
{
return $this->belongsTo(\App\User::class, 'user_id');
}
/**
* Belongs to User
*
*
*/
public function reciever()
{
return $this->belongsTo(\App\User::class, 'accepted_by');
}
}