Download the PHP package laravel-freelancer-nl/laravel-index-now without Composer

On this page you can find all versions of the php package laravel-freelancer-nl/laravel-index-now. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-index-now

Laravel IndexNow - Submit webpage updates to search engines

Latest Version on Packagist Code Quality Tests Code Coverage License Total Downloads

This packages provides a wrapper to use the IndexNow api in Laravel. This makes indexing new webpages in (some) search engines easy and fast. It makes for a nice little addition to sitemaps.

IndexNow is an API created by Microsoft Bing & Yandex to allow you to submit page changes to their search engines quickly. A submission to one search engine will automatically pass the submission on to the others.

At the time of this writing Google is considering supporting the API and has announced it will be testing it.

Installation

You can install the package via composer:

You can publish the config file with:

This is the contents of the published config file:

Generate a new key

The IndexNow API matches the request key to a key file within the host domain. To generate the keyfile you use the following artisan command:

This will create a keyfile in the public_dir() of your project and output the key. Copy the displayed key and place it in your .env file.

If you've set a key location in the config it will be prefixed to the file.

Running this command multiple times will generate a new key and key file.

Only submit pages for your production environment

You probably don't want to submit pages in any environment other than production.

By default, this package assumes that your production environment is called 'production' and will only submit when it matches the configured name in the package.

In the case of an environment mismatch it will log a submission 'attempt' instead of actually submitting the page to the search engines.

If you use an alternative name for your production environment you can set INDEXNOW_PRODUCTION_ENV in your .env to match.

You can disable this by setting INDEXNOW_PRODUCTION_ENV to false.

Usage

You can submit one or more pages per request by calling the facade and passing the url(s) to the submit method.

Note that the urls must be fully qualified without query parameters and without a fragment.

Submit a single page

Submit a multiple pages

To submit multiple pages at once just add an array of urls.

Prevent spam: delay page submissions

You can delay page submissions by using the delaySubmission method. This dispatches the IndexNowSubmitJob with a delay in seconds as configured. The job is unique by payload, so multiple submissions of the same urls won't push a job to the queue before the current one is handled.

You can override the configured default delay by adding your own.

When to delay submits

It isn't uncommon for people to make additional edits after creating or updating a page. On these actions it is a good idea to delay the submission.

When deleting pages you can just submit the urls immediately.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-index-now with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.4
illuminate/contracts Version ^9.0|^10.0|^11.0
nunomaduro/termwind Version ^1.10|^2.0
spatie/laravel-package-tools Version ^1.9.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laravel-freelancer-nl/laravel-index-now contains the following files

Loading the files please wait ....