Files
monica/app/Models/Settings/Term.php
T
Régis FreydandGitHub 29197090a7 Restructure where models are stored (#1476)
The idea is to clean the repository a little bit by moving models into their respective folders.
2018-06-14 20:49:12 -04:00

25 lines
460 B
PHP

<?php
namespace App\Models\Settings;
use App\Models\User\User;
use Illuminate\Database\Eloquent\Model;
class Term extends Model
{
/**
* The attributes that aren't mass assignable.
*
* @var array
*/
protected $guarded = ['id'];
/**
* Get the user record associated with the term.
*/
public function users()
{
return $this->belongsToMany(User::class)->withPivot('user_id')->withTimestamps();
}
}