Files
cv-roberto/app/Models/Personalia.php
Roberto 9df6c0ab46
All checks were successful
Tests / Laravel tests (pull_request) Successful in 3m31s
feat: include testing, factories, git workflow for testing.
2026-06-03 21:23:39 +02:00

30 lines
542 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Personalia extends Model
{
use HasFactory;
protected $fillable = ['key', 'value', 'hidden', 'icon'];
protected $table = 'personalia';
protected $casts = [
'hidden' => 'boolean',
];
public function image()
{
return $this->getFirstMedia('image');
}
public function imageUrl()
{
return $this->image() ? $this->image()->getUrl() : null;
}
}