Download the PHP package davido/pgchecker without Composer
On this page you can find all versions of the php package davido/pgchecker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download davido/pgchecker
More information about davido/pgchecker
Files in davido/pgchecker
Package pgchecker
Short Description A package for integrating copyleaks plagiarism checker easily in your laravel application
License MIT
Informations about the package pgchecker
Copyleaks V3 API integration with laraval 8+
A package for integrating Copyleaks plagiarism checker easily in your Laravel app
Requirements
- PHP 7.4 or above.
- Laravel 8 or above.
Installation
You can install the package using composer.
You can also add the follow line to you composer.json file and save.
Then run this command to update composer.
You need to also publish the config files
Setup
-
Sign up on the Copyleaks website.
-
Visit Copyleaks API Dashboard to generate your api keys.
- If you previously publish the config file, you must have noticed a new file (config/copyleaks.php) you can edit the config file, or add the following to your .env file.
Usage
You can use the following code to scan text or a file and you get a json data as a response
You can use also submit text or a file for scan only without getting the result immediately.
this will return a unique scan id that can be used to retrieve the result later using the following code.
How it works
Under the hood the package authenticate the user with copyleaks and then submits the file or text for scanning, the scanned results are receive via a webhook and the result is saved in the cache using the cache settings defined in the laravel package.
The scan results can be retrieved immediately or later with the unique scan id provided.
Local Setup and Testing
Since copyleaks uses webhook to return result, on local we will need a ngrok to retrieve the API result.
On mac use,
to install ngrok.
Then start ngrok server using,
also start a local server on the same port using,
also update the url gotten from ngrok as the in the .env file
we only need this for testing purpose and never forget to remove the variable in staging or production environment.