21-11-2025
This commit is contained in:
parent
fa2ebd457d
commit
07959c0ba2
113 changed files with 4730 additions and 898 deletions
36
app/Models/Hub.php
Normal file
36
app/Models/Hub.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Hub extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'slug',
|
||||
'keyvisual_url',
|
||||
'emblem_url',
|
||||
'is_active',
|
||||
];
|
||||
|
||||
/**
|
||||
* Ein Hub besteht aus vielen Location-Einträgen (PLZs).
|
||||
*/
|
||||
public function locations(): HasMany
|
||||
{
|
||||
return $this->hasMany(HubLocation::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ein Hub hat viele Partner (Händler, Makler).
|
||||
*/
|
||||
public function partners(): HasMany
|
||||
{
|
||||
return $this->hasMany(Partner::class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue