feat(LRL App): init V0
This commit is contained in:
27
app/Models/Contact.php
Normal file
27
app/Models/Contact.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user