Download the PHP package uocnv/spatie-crawler-toolkit-for-laravel without Composer
On this page you can find all versions of the php package uocnv/spatie-crawler-toolkit-for-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download uocnv/spatie-crawler-toolkit-for-laravel
More information about uocnv/spatie-crawler-toolkit-for-laravel
Files in uocnv/spatie-crawler-toolkit-for-laravel
Package spatie-crawler-toolkit-for-laravel
Short Description Handy classes for Spatie's crawler when using it with Laravel.
License MIT
Informations about the package spatie-crawler-toolkit-for-laravel
Spatie Crawler Toolkit for Laravel
PHP 8 should work, but is not extensively tested. Please report any issues you might find!
A set of classes to use Spatie's crawler with Laravel. Aim is to simplify building crawler applications or adding a crawler to an existing Laravel project. At the moment the following helper classes are implemented:
Cache Crawl Queue
The CacheCrawlQueue allows use the pre-configured Cache in Laravel to store the queue. It stores any actions performed on the queue directly to avoid the need to manually store the queue. You can add it directly to your crawler:
With this you can stop the crawl and restart at any time. This requires a cache-driver being configured in your .env
file.
Crawl Logger
The Crawl Logger is an observer you can add to your crawler to enable logging of crawl events:
You can export the configuration (see below) to tweak which events are logged.
Crawl Events
The toolkit contains an observer to send you Laravel events allowing you to react to crawl events. This covers the following events:
By default, no events are emitted. To enable events, you will need to add the event observer to your crawler:
An optional identifier can be passed to the crawl events to distinguish between different crawls:
Planned functionality
- Batched crawling using Laravel Queues.
For any suggestions on how to enhance this, please raise an issue.
Requirements & Install
Requirements
- Laravel 6, 7, or 8.
- Cache and Log configured in Laravel.
Installation
Optionally, you can publish the configuration file:
Contributing
Please raise a PR or issue.
License
Released under the MIT license. Please see License File for more information.
All versions of spatie-crawler-toolkit-for-laravel with dependencies
laravel/framework Version ^6.0|^7.0|^8.0
spatie/crawler Version ^6.0.0|^7.0