justraviga/laravel-pexels

Pexels API client for Laravel
12,181 5
Install
composer require justraviga/laravel-pexels
Latest Version:0.1.8
PHP:^7.4|^8.0
License:MIT
Last Updated:Feb 21, 2024
Links: GitHub  ·  Packagist
Maintainer: DeDmytro

Laravel Pexels

Provides access to Pexels API for Laravel projects

Stable Version Unstable Version Total Downloads License

Table of contents

Installation

To get the latest version of Laravel Pexels, simply require the project using Composer:

$ composer require justraviga/laravel-pexels

Or manually update require block of composer.json and run composer update.

{
    "require": {
        "justraviga/laravel-pexels": "^0.1"
    }
}

Using

use JustRaviga\Pexels\Clients\PhotoApiClient;
use JustRaviga\Pexels\Facades\Pexels;

$client = new PhotoApiClient(); // Good for controller method/artisan command handle()/job handle() dependency injection
// OR
$client = Pexels::photos();

$response = $client->search('cats');

foreach ($response->photos as $photo){
    $photo->width;
    $photo->height;
    $photo->url;
    $photo->src->medium;
}

Related Packages

torann/api-client

A reusable base API client for use with remote services.

759 4
morscate/uber-eats

A PHP client to integrate with the Uber Eats API

8,751 4
foodticket/jet-connect-client

A PHP client to integrate with the JET Connect API

12,861 1
foodticket/takeaway-pos-client

A PHP client to integrate with the Takeaway POS API

12,243 1
foodticket/deliveroo

A PHP client to integrate with the Deliveroo API

9,895 1

Version History

Version Released PHP Laravel License
0.1.8 ^7.4|^8.0 ^7.0|^8.0|^9.0 MIT
0.1.7 ^7.4|^8.0 ^7.0|^8.0|^9.0 MIT
0.1.6 ^7.4|^8.0 ^7.0|^8.0|^9.0 MIT
0.1.5 ^7.4|^8.0 ^7.0|^8.0 MIT
0.1.4 ^7.4|^8.0 ^7.0|^8.0 MIT