Update (copies)
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Category;
|
||||
use App\Models\HybridTopRssPostKeywords;
|
||||
use App\Models\RssPost;
|
||||
use App\Models\RssPostKeyword;
|
||||
use Artesaos\SEOTools\Facades\SEOTools;
|
||||
use Illuminate\Http\Request;
|
||||
use JsonLd\Context;
|
||||
@@ -26,19 +28,38 @@ public function searchResults(Request $request, $query)
|
||||
|
||||
$query = urldecode($query);
|
||||
|
||||
$rss_post_keyword = RssPostKeyword::where('value_lowercased', strtolower($query))->first();
|
||||
|
||||
if (!is_null($rss_post_keyword))
|
||||
{
|
||||
$query = $rss_post_keyword->value;
|
||||
}
|
||||
|
||||
$breadcrumbs = collect([
|
||||
['name' => 'Home', 'url' => route('front.home')],
|
||||
['name' => 'News Bites', 'url' => route('front.all')],
|
||||
['name' => '#'.$query, 'url' => null],
|
||||
['name' => strtolower('#'.$query), 'url' => null],
|
||||
]);
|
||||
|
||||
$title = 'Latest News about '.ucwords($query).' in FutureWalker';
|
||||
$title = "{$query} News Bites: Updated Hourly";
|
||||
|
||||
$top_rss_keywords = HybridTopRssPostKeywords::get(1, 5);
|
||||
|
||||
$description = "Stay updated with " . $query;
|
||||
|
||||
foreach ($top_rss_keywords as $rss_keyword)
|
||||
{
|
||||
$description .= ", " . $rss_keyword->value;
|
||||
}
|
||||
$description .= " and 1000+ other news topics with 1-minute news bites with FutureWalker.";
|
||||
|
||||
|
||||
SEOTools::metatags();
|
||||
SEOTools::twitter();
|
||||
SEOTools::opengraph();
|
||||
SEOTools::jsonLd();
|
||||
SEOTools::setTitle($title, false);
|
||||
SEOTools::setDescription($description);
|
||||
|
||||
$rss_posts = RssPost::with('category', 'entities_keywords')
|
||||
->where('status', 'published')
|
||||
@@ -73,13 +94,15 @@ public function index(Request $request)
|
||||
['name' => 'News Bites', 'url' => null], // or you can set a route for Latest News if there's a specific one
|
||||
]);
|
||||
|
||||
$title = 'Latest News Bites from FutureWalker';
|
||||
$title = '1-minute AI & Tech News Bites: Updated Hourly';
|
||||
$description = "Stay updated over 1000+ news topics summarised to 1-minute news bites with FutureWalker.";
|
||||
|
||||
SEOTools::metatags();
|
||||
SEOTools::twitter();
|
||||
SEOTools::opengraph();
|
||||
SEOTools::jsonLd();
|
||||
SEOTools::setTitle($title, false);
|
||||
SEOTools::setDescription($description);
|
||||
|
||||
$rss_posts = RssPost::with('category', 'entities_keywords')->where('status', 'published')
|
||||
->where('published_at', '<=', now())
|
||||
@@ -120,13 +143,25 @@ public function category(Request $request, $category_slug)
|
||||
['name' => $category->name, 'url' => null],
|
||||
]);
|
||||
|
||||
$title = 'Latest News from FutureWalker';
|
||||
$title = 'AI & Tech ' . "$category->name" . ": Updated Hourly" ;
|
||||
|
||||
$top_rss_keywords = HybridTopRssPostKeywords::get(1, 10);
|
||||
|
||||
$description = "Stay updated with ";
|
||||
|
||||
foreach ($top_rss_keywords as $rss_keyword)
|
||||
{
|
||||
$description .= ", " . $rss_keyword->value;
|
||||
}
|
||||
$description .= " and 1000+ other news " . strtolower($category->name) . " with 1-minute news bites with FutureWalker.";
|
||||
|
||||
|
||||
SEOTools::metatags();
|
||||
SEOTools::twitter();
|
||||
SEOTools::opengraph();
|
||||
SEOTools::jsonLd();
|
||||
SEOTools::setTitle($title, false);
|
||||
SEOTools::setDescription($description);
|
||||
|
||||
$rss_posts = RssPost::with('category', 'entities_keywords')->where('status', 'published')
|
||||
->where('category_id', $category->id)
|
||||
|
||||
Reference in New Issue
Block a user