48 lines
916 B
PHP
48 lines
916 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Scopes\KontoScope;
|
|
use Database\Factories\AuftraggeberFactory;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Auftraggeber extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'konto_id',
|
|
'title',
|
|
'gender',
|
|
'name',
|
|
'company',
|
|
'email',
|
|
'phone',
|
|
'logo',
|
|
'logo_anzeigen',
|
|
'text_anzeigen',
|
|
];
|
|
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'kopf' => 'array',
|
|
];
|
|
}
|
|
|
|
protected static function booted(): void
|
|
{
|
|
static::addGlobalScope(new KontoScope);
|
|
}
|
|
|
|
protected static function newFactory(): Factory
|
|
{
|
|
return AuftraggeberFactory::new();
|
|
}
|
|
}
|