|
|
@ -4,6 +4,7 @@ namespace App\Entities\Projects; |
|
|
|
|
|
|
|
|
use App\Entities\Invoices\Invoice; |
|
|
use App\Entities\Invoices\Invoice; |
|
|
use App\Entities\Payments\Payment; |
|
|
use App\Entities\Payments\Payment; |
|
|
|
|
|
use App\Entities\Projects\Comment; |
|
|
use App\Entities\Partners\Customer; |
|
|
use App\Entities\Partners\Customer; |
|
|
use Illuminate\Database\Eloquent\Model; |
|
|
use Illuminate\Database\Eloquent\Model; |
|
|
use Laracasts\Presenter\PresentableTrait; |
|
|
use Laracasts\Presenter\PresentableTrait; |
|
|
@ -67,6 +68,11 @@ class Project extends Model |
|
|
return $this->hasMany(Payment::class)->orderBy('date', 'desc'); |
|
|
return $this->hasMany(Payment::class)->orderBy('date', 'desc'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function comments() |
|
|
|
|
|
{ |
|
|
|
|
|
return $this->morphMany(Comment::class, 'commentable'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public function customer() |
|
|
public function customer() |
|
|
{ |
|
|
{ |
|
|
return $this->belongsTo(Customer::class); |
|
|
return $this->belongsTo(Customer::class); |
|
|
|