marcosper/copyscape-laravel

Copyscape service provider for Laravel 5

Downloads

16

Stars

2

Version

v1.0

CopyScape for Laravel 5

Latest Version on Packagist Software License

Introduction

copyscape-laravel is a laravel 5 service provider to easily Copyscape premium API using php-libCopyScape


Installation

Add copyscape-laravel to your composer.json file:

"require": {
  "marcosper/copyscape-laravel": "dev-master"
}

Use composer to install this package.

$ composer update

Registering the Package

Register the service provider within the providers array found in config/app.php:

'providers' => [
	// ...
	
	Marcosper\CopyscapeLaravel\CopyscapeServiceProvider::class,
]

Add an alias within the aliases array found in config/app.php:

'aliases' => [
	// ...
	
	'Copyscape'     => Marcosper\CopyscapeLaravel\Facades\Copyscape::class,
]

Configuration

Publish configuration file using artisan command

$ php artisan vendor:publish --provider="Marcosper\CopyscapeLaravel\CopyscapeServiceProvider"

Then in .env file add

COPYSCAPE_USER=copyscape_user
COPYSCAPE_KEY=copyscape_key
COPYSCAPE_SSL=false || true(for use systems cacert.pem) or route to use custom cacert.pem 
COPYSCAPE_DEBUG=true

Usage

Search for text on internet:

//Search text with 10 full comparisons
$text = "Search if this text is plaigarism";
Copyscape::searchInternetText($text,10);

Get credits of account:

Copyscape::getCredits();
MarcosPer

Author

MarcosPer