feat: implement real-time SEO character counters and improve default avatar handling and translation logic.
This commit is contained in:
@@ -156,6 +156,8 @@ class CareerController extends Controller
|
||||
'title' => 'required|string|max:255',
|
||||
'intern_category' => 'required|string|in:experience,technical_challenge,product_showcase',
|
||||
'excerpt' => 'nullable|string|max:500',
|
||||
'meta_title' => 'nullable|string|max:60',
|
||||
'meta_description' => 'nullable|string|max:160',
|
||||
'content' => 'required|string|min:50',
|
||||
'featured_image' => 'nullable|image|mimes:jpeg,png,jpg,webp|max:5120',
|
||||
'action_type' => 'required|string|in:draft,submit',
|
||||
@@ -164,6 +166,8 @@ class CareerController extends Controller
|
||||
'intern_category.required' => 'Lütfen bir kategori seçin.',
|
||||
'content.required' => 'Lütfen blog yazısı içeriğini girin.',
|
||||
'content.min' => 'Blog içeriği en az 50 karakter olmalıdır.',
|
||||
'meta_title.max' => 'Meta Başlık en fazla 60 karakter olmalıdır.',
|
||||
'meta_description.max' => 'Meta Açıklama en fazla 160 karakter olmalıdır.',
|
||||
'featured_image.image' => 'Görsel geçerli bir resim dosyası olmalıdır.',
|
||||
]);
|
||||
|
||||
@@ -195,8 +199,8 @@ class CareerController extends Controller
|
||||
$blog->excerpt = $request->excerpt;
|
||||
$blog->content = $request->content;
|
||||
$blog->status = $status;
|
||||
$blog->meta_title = $request->title;
|
||||
$blog->meta_description = Str::limit(strip_tags($request->excerpt ?: $request->content), 160);
|
||||
$blog->meta_title = $request->filled('meta_title') ? Str::limit($request->meta_title, 60, '') : Str::limit($request->title, 60, '');
|
||||
$blog->meta_description = $request->filled('meta_description') ? Str::limit($request->meta_description, 160, '') : Str::limit(strip_tags($request->excerpt ?: $request->content), 160, '');
|
||||
|
||||
if ($request->hasFile('featured_image')) {
|
||||
if ($blog->featured_image && Storage::disk('public')->exists($blog->featured_image)) {
|
||||
|
||||
Reference in New Issue
Block a user