Deploy Backend / deploy (push) Successful in 2m40s
Contact form messages were sent via mailto and the site has no mail service, so visitors saw a placeholder caveat instead of a working channel. Add a contact_messages table, a public throttled POST endpoint, and admin list/mark/delete endpoints, then wire them into the panel. Replace the faker-generated blog demonstration content with real English and Persian SEO-oriented articles via RealBlogContentSeeder (deterministic, bilingual posts with per-language categories and tags, and cross-linked related posts).
29 lines
489 B
PHP
29 lines
489 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ContactMessage extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'contact_messages';
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'email',
|
|
'message',
|
|
'read_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'read_at' => 'datetime',
|
|
];
|
|
|
|
public function isRead(): bool
|
|
{
|
|
return $this->read_at !== null;
|
|
}
|
|
} |