Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

BudgetItem.php 857B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace App\Models\Accounting;
  3. use App\Concerns\Blamable;
  4. use App\Concerns\CompanyOwned;
  5. use Illuminate\Database\Eloquent\Factories\HasFactory;
  6. use Illuminate\Database\Eloquent\Model;
  7. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  8. use Illuminate\Database\Eloquent\Relations\HasMany;
  9. class BudgetItem extends Model
  10. {
  11. use Blamable;
  12. use CompanyOwned;
  13. use HasFactory;
  14. protected $fillable = [
  15. 'company_id',
  16. 'budget_id',
  17. 'account_id',
  18. 'created_by',
  19. 'updated_by',
  20. ];
  21. public function budget(): BelongsTo
  22. {
  23. return $this->belongsTo(Budget::class);
  24. }
  25. public function account(): BelongsTo
  26. {
  27. return $this->belongsTo(Account::class);
  28. }
  29. public function allocations(): HasMany
  30. {
  31. return $this->hasMany(BudgetAllocation::class);
  32. }
  33. }