https://github.com/aon4o/laravel-trustpilot
TrustPilot scraper for Laravel applications.
https://github.com/aon4o/laravel-trustpilot
laravel php trustpilot
Last synced: about 2 months ago
JSON representation
TrustPilot scraper for Laravel applications.
- Host: GitHub
- URL: https://github.com/aon4o/laravel-trustpilot
- Owner: aon4o
- License: mit
- Created: 2023-01-23T19:15:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-09T21:39:25.000Z (over 1 year ago)
- Last Synced: 2025-03-28T14:21:16.792Z (2 months ago)
- Topics: laravel, php, trustpilot
- Language: PHP
- Homepage: https://packagist.org/packages/aon2003/laravel-trustpilot
- Size: 67.4 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# TrustPilot scraper for Laravel applications.
[](https://packagist.org/packages/aon2003/laravel-trustpilot)
[](https://github.com/aon2003/laravel-trustpilot/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/aon2003/laravel-trustpilot/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[](https://packagist.org/packages/aon2003/laravel-trustpilot)


This is a simple Laravel package for scraping TrustPilot scores and reviews.
## Support us
[](https://www.buymeacoffee.com/aon4o)
## Installation
You can install the package via composer:
```bash
composer require aon2003/laravel-trustpilot
```You can publish the config file with:
```bash
php artisan vendor:publish --tag="trustpilot-config"
```This is the contents of the published config file:
```php
return [
/*
|--------------------------------------------------------------------------
| Default Domain
|--------------------------------------------------------------------------
|
| This is the domain for which the reviews will be scraped by default.
| Supports subdomains.
*/
'domain' => 'www.example.com',/*
|--------------------------------------------------------------------------
| Default Language
|--------------------------------------------------------------------------
|
| This is the language in which the reviews will be scraped by default.
|
| Supported values: "all", ISO 639-1 language codes (ex.: "en", "ru")
|
*/
'language' => 'all',
];
```## Usage
```php
$score = LaravelTrustpilot::getScore($domain); // float
$reviews = LaravelTrustpilot::getReviews($domain, $language); // array
```If you don't provide a domain and language the values from the config file will be used.
## Commands
Additionally, there are two commands that can be used for testing purposes.
### trustpilot:score
```php
Description:
Gets the TrustScore of a given domain and outputs it to the console.Usage:
trustpilot:score []Arguments:
domain The domain for which to get the TrustScore.
```### trustpilot:reviews
```php
Description:
Gets the reviews of a given domain and outputs them to the console.Usage:
trustpilot:reviews [ []]Arguments:
domain The domain for which to get the TrustPilot reviews.
language The language in which to get the TrustPilot reviews.
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
If you want to contribute, we would be pleased to see your pull requests.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [aon4o](https://github.com/aon2003)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.