some work on models
This commit is contained in:
@@ -12,6 +12,16 @@ class Revision extends Model
|
||||
{
|
||||
use HasRelaquentRelationships;
|
||||
|
||||
protected static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::deleting(function(Revision $self) {
|
||||
// update refcounts
|
||||
$self->rows()->decrement('refs');
|
||||
});
|
||||
}
|
||||
|
||||
/** Included rows */
|
||||
public function rows()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user