Public Access
43 lines
775 B
PHP
43 lines
775 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Bewerbung extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'bewerbungen';
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'text',
|
|
'pic_path',
|
|
'bedingungen_path',
|
|
'active',
|
|
'time',
|
|
'start_at',
|
|
'end_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'active' => 'boolean',
|
|
'time' => 'boolean',
|
|
'start_at' => 'datetime',
|
|
'end_at' => 'datetime',
|
|
];
|
|
// app/Models/Bewerbung.php
|
|
public function applications()
|
|
{
|
|
return $this->hasMany(\App\Models\BandApplication::class, 'bewerbung_id');
|
|
}
|
|
|
|
public function getRouteKeyName()
|
|
{
|
|
return 'slug';
|
|
}
|
|
}
|
|
|