How to use Unsplash API code example

Example 1: fake api images

Just add your desired image size (width & height) after our URL, and you'll get a random image.

https://picsum.photos/200/300
To get a square image, just add the size.

https://picsum.photos/200

Example 2: unsplash php api

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

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

Example 3: unsplash php api

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

Tags:

Php Example