Update (test): add indexing route
This commit is contained in:
25
app/Http/Controllers/Tests/TestController.php
Normal file
25
app/Http/Controllers/Tests/TestController.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Tests;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
|
||||
use LaravelGoogleIndexing;
|
||||
|
||||
class TestController extends Controller
|
||||
{
|
||||
public function indexing(Request $request)
|
||||
{
|
||||
$url = $request->input('url');
|
||||
|
||||
if (is_null($url))
|
||||
{
|
||||
abort(404);
|
||||
}
|
||||
|
||||
IndexNow::submit($url);
|
||||
LaravelGoogleIndexing::create()->update($url);
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,8 @@
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
|
||||
use LaravelGoogleIndexing;
|
||||
// use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
|
||||
// use LaravelGoogleIndexing;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -28,18 +28,7 @@
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('/indexing', function (Request $request) {
|
||||
|
||||
$url = $request->input('url');
|
||||
|
||||
if (is_null($url))
|
||||
{
|
||||
abort(404);
|
||||
}
|
||||
|
||||
IndexNow::submit($url);
|
||||
LaravelGoogleIndexing::create()->update($url);
|
||||
});
|
||||
Route::get('/indexing', [App\Http\Controllers\Test\TestController::class, 'indexing']);
|
||||
|
||||
Route::get('/serp-ai-gen', function (Request $request) {
|
||||
AISerpGenArticleJob::dispatch()->onQueue('default')->onConnection('default');
|
||||
|
||||
Reference in New Issue
Block a user