wdevs / laravel-zenserp
Easily work with the Zenserp API in a Laravel application.
Requires
- php: ^7.3
- guzzlehttp/guzzle: ^7.0.1
- illuminate/support: ^8.0
Requires (Dev)
- orchestra/testbench: ^6.2
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2025-03-29 00:48:58 UTC
README
Zenserp Laravel API Client
Laravel package for the Zenserp API.
Getting Started
Run the following command to install this package into your project.
composer require wdevs/laravel-zenserp
Optional: publish the config files with the following command:
php artisan vendor:publish --provider="WDevs\LaravelZenserp\Providers\LaravelZenserpServiceProvider"
Set the environment variables in your .env file like this:
ZENSERP_API_KEY="YOURAPIKEY"
Prerequisites
You will need Composer to install this package and a valid Zenserp API key.
Installing
After installing this package with Composer, create a new Zenserp instance. And set the your Zenserp API key in your env file.
Something like this:
$client = new LaravelZenserp();
And call the desired endpoint
$client->search()->searchFor('Pied Piper');
The current implemented endpoints are:
- GET /search
Documentation for the available parameters can be found here: https://zenserp.com/documentation
Running the tests
Copy the phpunit.xml.dist and rename it to phpunit.xml. Set the env variables in the phpunit.xml files.
PLEASE NOTE: running the tests will cost you credits!!!!
- ZENSERP_API_KEY: A valid Zenserp API key
Please see the phpunit.xml.dist for the template.
Run the tests in the Tests directory with PHPUnit.
Built With
- Zenserp - For the API
- PHPUnit - Test Framework
- Laravel - Package Framework
- Laravel Package Boilerplate - For boiler template this package
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please help us to develop this package. Every input and/or feedback is really appreciated! Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email us instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.