PHP code example of gregpriday / laravel-serper

1. Go to this page and download the library: Download gregpriday/laravel-serper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gregpriday / laravel-serper example snippets


return [
    'key' => env('SERPER_API_KEY', ''),
];

use GregPriday\LaravelSerper\Facades\Serper;

$results = Serper::search('Laravel');

$newsResults = Serper::search('Laravel', 10, 'news');

$queries = ['Laravel', 'PHP'];
$results = Serper::searchMulti($queries, 10, 'search');
bash
php artisan vendor:publish --provider="GregPriday\LaravelSerper\SerperServiceProvider"