1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00
invoiceninja/app/Models/Task.php
2015-06-14 17:49:13 +03:00

42 lines
746 B
PHP

<?php namespace App\Models;
use DB;
use Illuminate\Database\Eloquent\SoftDeletes;
class Task extends EntityModel
{
use SoftDeletes;
public function account()
{
return $this->belongsTo('App\Models\Account');
}
public function invoice()
{
return $this->belongsTo('App\Models\Invoice');
}
public function client()
{
return $this->belongsTo('App\Models\Client')->withTrashed();
}
}
Task::created(function ($task) {
//Activity::createTask($task);
});
Task::updating(function ($task) {
//Activity::updateTask($task);
});
Task::deleting(function ($task) {
//Activity::archiveTask($task);
});
Task::restoring(function ($task) {
//Activity::restoreTask($task);
});