2026-05-20 18:25:15 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2026-06-08 16:25:52 +02:00
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
2026-05-20 18:25:15 +02:00
|
|
|
|
|
|
|
|
class Language extends Model
|
|
|
|
|
{
|
|
|
|
|
protected $fillable = [ 'name', 'slug' ];
|
2026-06-08 16:25:52 +02:00
|
|
|
|
|
|
|
|
public function entries(): BelongsToMany
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsToMany(Entry::class, 'entry_languages');
|
|
|
|
|
}
|
2026-05-20 18:25:15 +02:00
|
|
|
}
|