90 lines
3.0 KiB
PHP
90 lines
3.0 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Front;
|
|
|
|
use App\Helpers\FirstParty\Cached\Cached;
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\AiTool;
|
|
use Artesaos\SEOTools\Facades\SEOMeta;
|
|
use Artesaos\SEOTools\Facades\SEOTools;
|
|
use GrahamCampbell\Markdown\Facades\Markdown;
|
|
use Illuminate\Http\Request;
|
|
|
|
class FrontHomeController extends Controller
|
|
{
|
|
public function index(Request $request)
|
|
{
|
|
$tools_count_rounded = round_to_nearest_base(Cached::tools_count());
|
|
|
|
$latest_ai_tools = AiTool::where('status', 'live')->whereNotNull('screenshot_img')->take(12)->orderBy('created_at', 'DESC')->get();
|
|
|
|
return view('front.home', compact('latest_ai_tools', 'tools_count_rounded'));
|
|
}
|
|
|
|
public function terms(Request $request)
|
|
{
|
|
$markdown = file_get_contents(resource_path('markdown/terms.md'));
|
|
|
|
$title = 'Terms of Service';
|
|
$description = 'Our Terms of Service outline your rights, responsibilities, and the standards we uphold for a seamless experience.';
|
|
|
|
SEOTools::metatags();
|
|
SEOTools::twitter();
|
|
SEOTools::opengraph();
|
|
SEOTools::jsonLd();
|
|
SEOTools::setTitle($title);
|
|
SEOTools::setDescription($description);
|
|
SEOMeta::setRobots('noindex');
|
|
|
|
$content = Markdown::convert($markdown)->getContent();
|
|
|
|
//$content = $this->injectTailwindClasses($content);
|
|
|
|
return view('front.pages', compact('content', 'title', 'description'));
|
|
}
|
|
|
|
public function privacy(Request $request)
|
|
{
|
|
$markdown = file_get_contents(resource_path('markdown/privacy.md'));
|
|
|
|
$title = 'Privacy Policy';
|
|
$description = 'Our Privacy Policy provides clarity about the data we collect and how we use it, ensuring your peace of mind.';
|
|
|
|
SEOTools::metatags();
|
|
SEOTools::twitter();
|
|
SEOTools::opengraph();
|
|
SEOTools::jsonLd();
|
|
SEOTools::setTitle($title);
|
|
SEOTools::setDescription($description);
|
|
SEOMeta::setRobots('noindex');
|
|
|
|
$content = Markdown::convert($markdown)->getContent();
|
|
|
|
//$content = $this->injectTailwindClasses($content);
|
|
|
|
return view('front.pages', compact('content', 'title', 'description'));
|
|
}
|
|
|
|
public function disclaimer(Request $request)
|
|
{
|
|
$markdown = file_get_contents(resource_path('markdown/disclaimer.md'));
|
|
|
|
$title = 'Disclaimer';
|
|
$description = 'AI Buddy Tool provides the content on this website purely for informational purposes and should not be interpreted as legal, financial, or medical guidance.';
|
|
|
|
SEOTools::metatags();
|
|
SEOTools::twitter();
|
|
SEOTools::opengraph();
|
|
SEOTools::jsonLd();
|
|
SEOTools::setTitle($title);
|
|
SEOTools::setDescription($description);
|
|
SEOMeta::setRobots('noindex');
|
|
|
|
$content = Markdown::convert($markdown)->getContent();
|
|
|
|
//$content = $this->injectTailwindClasses($content);
|
|
|
|
return view('front.pages', compact('content', 'title', 'description'));
|
|
}
|
|
}
|