Files
roxane/app/Models/Contact.php
2025-10-22 17:09:48 +02:00

28 lines
519 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Contact extends Model
{
protected $fillable = [
'id',
'firstname',
'lastname',
'email',
'address',
'subject',
'message',
];
public static function getAttributeLabel(string $attribute): string
{
return __("contacts.fields.$attribute");
}
public function getFullNameAttribute(): string
{
return "{$this->firstname} {$this->lastname}";
}
}