Store contact messages in DB and seed real bilingual blog content
Deploy Backend / deploy (push) Successful in 2m40s
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).
This commit is contained in:
1 parent
16057c06b9
commit
d4f41b9c2e
8 files changed
+930
No files matched your search
@@ -6,6 +6,7 @@ use App\Http\Controllers\Api\Blog\CategoryController;
|
||||
use App\Http\Controllers\Api\Blog\HomeController;
|
||||
use App\Http\Controllers\Api\Blog\PostController;
|
||||
use App\Http\Controllers\Api\Blog\TagController;
|
||||
use App\Http\Controllers\Api\ContactMessageController;
|
||||
use App\Http\Controllers\Api\Website\AboutMeController;
|
||||
use App\Http\Controllers\Api\Website\ProjectCategoryController;
|
||||
use App\Http\Controllers\Api\Website\ProjectController;
|
||||
@@ -66,6 +67,18 @@ Route::middleware('throttle:60,1')->group(function () {
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Public contact form
|
||||
|--------------------------------------------------------------------------
|
||||
| The site has no mail service; messages are stored and read from the admin
|
||||
| panel, so the write endpoint is public (no auth) but throttled to keep
|
||||
| spam from flooding the inbox.
|
||||
*/
|
||||
|
||||
Route::post('contact', [ContactMessageController::class, 'store'])
|
||||
->middleware('throttle:5,1');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Admin write API
|
||||
|
||||
Reference in new issue
Block a user