Files
monica/app/Tag.php
T
Régis Freyd a2172f0851 Add style CI (#503)
Hopefully this will result in slightly better code.
2017-07-26 21:02:55 -04:00

32 lines
591 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Tag extends Model
{
/**
* The attributes that aren't mass assignable.
*
* @var array
*/
protected $guarded = ['id'];
/**
* Get the account record associated with the debt.
*/
public function account()
{
return $this->belongsTo('App\Account');
}
/**
* Get the contact record associated with the debt.
*/
public function contacts()
{
return $this->belongsToMany('App\Contact')->withPivot('account_id')->withTimestamps();
}
}