Add (ai tool submission)
This commit is contained in:
@@ -3,9 +3,7 @@
|
||||
namespace App\Jobs\Tasks;
|
||||
|
||||
use App\Models\AiTool;
|
||||
use App\Notifications\PostWasPublished;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
|
||||
use LaravelGoogleIndexing;
|
||||
|
||||
@@ -19,27 +17,23 @@ public static function handle(int $ai_tool_id)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$ai_tool->is_ai_tool)
|
||||
{
|
||||
return ;
|
||||
if (! $ai_tool->is_ai_tool) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((app()->environment() == 'production') && (config('platform.general.indexing'))) {
|
||||
$ai_tool_url = route('front.aitool.show', ['ai_tool_slug' => $ai_tool->slug]);
|
||||
|
||||
try {
|
||||
IndexNow::submit($ai_tool_url);
|
||||
} catch (Exception) {
|
||||
}
|
||||
|
||||
if ((app()->environment() == 'production') && (config('platform.general.indexing'))) {
|
||||
$ai_tool_url = route('front.aitool.show', ['ai_tool_slug' => $ai_tool->slug]);
|
||||
try {
|
||||
LaravelGoogleIndexing::create()->update($ai_tool_url);
|
||||
} catch (Exception) {
|
||||
}
|
||||
|
||||
try {
|
||||
IndexNow::submit($ai_tool_url);
|
||||
} catch (Exception) {
|
||||
}
|
||||
|
||||
try {
|
||||
LaravelGoogleIndexing::create()->update($ai_tool_url);
|
||||
} catch (Exception) {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user