- Laravel 11, Blade, Alpine.js, Tailwind CSS - Produkt- & Kategorieverwaltung mit Varianten - Checkout (Vorkasse + Rechnung), Session-Warenkorb - Admin-Backend (Dashboard, Bestellungen, Kunden, CMS) - DSGVO-konform: Cookie-Consent, Impressum, Widerruf, AGB - PDF-Rechnung via dompdf, SMTP-Mailversand - Kundenverwaltung mit manueller Freischaltung Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
549 B
PHP
23 lines
549 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|
|
|
class AttributeValue extends Model
|
|
{
|
|
protected $fillable = ['attribute_id','value','sort_order'];
|
|
|
|
public function attribute(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Attribute::class);
|
|
}
|
|
|
|
public function variants(): BelongsToMany
|
|
{
|
|
return $this->belongsToMany(ProductVariant::class, 'product_variant_attribute_values');
|
|
}
|
|
}
|