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.

Address.php 866B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace App\Models\Common;
  3. use App\Concerns\Blamable;
  4. use App\Concerns\CompanyOwned;
  5. use App\Enums\Common\AddressType;
  6. use Illuminate\Database\Eloquent\Factories\HasFactory;
  7. use Illuminate\Database\Eloquent\Model;
  8. use Illuminate\Database\Eloquent\Relations\MorphTo;
  9. class Address extends Model
  10. {
  11. use Blamable;
  12. use CompanyOwned;
  13. use HasFactory;
  14. protected $table = 'addresses';
  15. protected $fillable = [
  16. 'company_id',
  17. 'type',
  18. 'recipient',
  19. 'phone',
  20. 'address_line_1',
  21. 'address_line_2',
  22. 'city',
  23. 'state',
  24. 'postal_code',
  25. 'country',
  26. 'notes',
  27. 'created_by',
  28. 'updated_by',
  29. ];
  30. protected $casts = [
  31. 'type' => AddressType::class,
  32. ];
  33. public function addressable(): MorphTo
  34. {
  35. return $this->morphTo();
  36. }
  37. }