Update (test): add indexing route

This commit is contained in:
2023-09-26 02:27:45 +08:00
parent adc983ef3a
commit e9c8179c13
2 changed files with 28 additions and 14 deletions

View 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);
}
}