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