- Bilder mit automatischen WebP-Webgrößen (640/1280/2048 px), Sortierung per Drag & Drop, Mehrfach-Upload, Import-Befehl photos:import - Webseiten-Texte als feste, bearbeitbare Bausteine (config/content.php), Rich-Text bereinigt ausgegeben - Ausstattung und FAQ aus der bisherigen Webseite übernommen - Rolle Inhalte hat Zugriff auf alle Webseiten-Bereiche Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42 lines
987 B
PHP
42 lines
987 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\AmenityArea;
|
|
use Database\Factories\AmenityFactory;
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* One line of the equipment list; highlights are featured on the home page.
|
|
*/
|
|
#[Fillable(['property_id', 'area', 'name', 'is_highlight', 'sort_order'])]
|
|
class Amenity extends Model
|
|
{
|
|
/** @use HasFactory<AmenityFactory> */
|
|
use HasFactory;
|
|
|
|
/**
|
|
* Get the attributes that should be cast.
|
|
*
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'area' => AmenityArea::class,
|
|
'is_highlight' => 'boolean',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo<Property, $this>
|
|
*/
|
|
public function property(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Property::class);
|
|
}
|
|
}
|