Displaying estimates
This commit is contained in:
1 parent
551b592b3b
commit
fe3429cd4e
8 files changed
+64
-11
No files matched your search
@@ -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