deringer / laravel-google-cse by michaeldyrynda

Google Custom Search Engine API wrapper
121
9
1
Package Data
Maintainer Username: michaeldyrynda
Maintainer Contact: michael@iatstuti.net (Michael Dyrynda)
Package Create Date: 2015-02-10
Package Last Update: 2015-02-10
Language: PHP
License: MIT
Last Refreshed: 2024-11-18 03:03:42
Package Statistics
Total Downloads: 121
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 9
Total Watchers: 1
Total Forks: 3
Total Open Issues: 0

laravel-google-cse

Laravel 4.x wrapper for the Google Custom Search Engine API. This may work for Laravel 5, but has not been tested.

Note: You will need an API key and search engine configured in your Google Custom Search control panel.

composer require iatstuti/google-cse

Once installed, add the Service Provider into app/config/app.php

'providers' => array(
    // ...
    'Iatstuti\GoogleCse\GoogleCseServiceProvider',
    // ...
),

If you wish to use an alias, set the following (also in app/config/app.php)

'aliases' => array(
    // ...
    'Iatstuti\GoogleCse\Facades\LaravelFacade',
    // ...
),

Lastly, publish the package configuration and update the configuration in app/config/packages/iatstuti/google-cse/cse.php.

php artisan config:publish iatstuti/google-cse

To use the package, you can make a call to GoogleCse::search($term).

Calls to this this method will return an array of items from the JSON structure outlined here.