Displaying estimates
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Scopes\InstancedModel;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
|
||||
/**
|
||||
* @property string $name
|
||||
@@ -44,7 +45,15 @@ class CostUnit extends InstancedModel
|
||||
return $this->hasMany(Invoice::class);
|
||||
}
|
||||
|
||||
public function estimates() : hasMany {
|
||||
return $this->hasMany(CostUnitEstimate::class);
|
||||
}
|
||||
|
||||
public function tenant() : BelongsTo {
|
||||
return $this->belongsTo(Tenant::class, 'tenant', 'slug');
|
||||
}
|
||||
|
||||
public function event() : HasOne {
|
||||
return $this->hasOne(Event::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user