33 lines
628 B
PHP
33 lines
628 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Brand extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'partner_id',
|
|
'name',
|
|
'slug',
|
|
'description',
|
|
'logo_url',
|
|
'is_active',
|
|
];
|
|
|
|
protected $casts = [
|
|
'is_active' => 'boolean',
|
|
];
|
|
|
|
/**
|
|
* Eine Brand gehört zu einem Partner (Manufacturer)
|
|
*/
|
|
public function partner(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Partner::class);
|
|
}
|
|
}
|