unsplash api key code example

Example 1: unsplash php api

$search = 'forest';
$page = 3;
$per_page = 15;
$orientation = 'landscape';

Unsplash\Search::photos($search, $page, $per_page, $orientation);

Example 2: unsplash php api

$collection = Unsplash\Collection::find(int $id);
$collection->remove(int $photo_id)

Example 3: unsplash php api

// Or apply some optional filters by passing a key value array of filters
$filters = [
    'username' => 'andy_brunner',
    'query'    => 'coffee',
    'w'        => 100,
    'h'        => 100
];
Unsplash\Photo::random($filters);

Tags:

Php Example