got rid of proposal-column references
This commit is contained in:
@@ -18,29 +18,6 @@ class Proposal extends Model
|
||||
use Reportable;
|
||||
use NotificationContext;
|
||||
|
||||
protected static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::deleting(function(Proposal $self) {
|
||||
// update refcounts
|
||||
$self->addedRows()->decrement('refs');
|
||||
$self->removedRows()->decrement('refs');
|
||||
});
|
||||
}
|
||||
|
||||
/** Added rows */
|
||||
public function addedRows()
|
||||
{
|
||||
return $this->belongsToMany(Row::class, 'proposal_add_row_pivot');
|
||||
}
|
||||
|
||||
/** Removed rows */
|
||||
public function removedRows()
|
||||
{
|
||||
return $this->belongsToMany(Row::class, 'proposal_remove_row_pivot');
|
||||
}
|
||||
|
||||
/** Authoring user */
|
||||
public function author()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user