{"id":14974486,"url":"https://github.com/shweshi/laravel-unsplash-wrapper","last_synced_at":"2025-10-27T09:30:30.498Z","repository":{"id":47094366,"uuid":"121030344","full_name":"shweshi/Laravel-Unsplash-Wrapper","owner":"shweshi","description":"A Laravel wrapper for Unsplash API's.","archived":false,"fork":false,"pushed_at":"2022-08-05T10:50:28.000Z","size":40,"stargazers_count":19,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T04:31:42.330Z","etag":null,"topics":["hacktoberfest","laravel","laravel-5-package","laravel-package","laravel-unsplash","laravel-unsplash-wrappser","laravel-wrapper","laravel5","php","unsplash","unsplash-api"],"latest_commit_sha":null,"homepage":"https://shweshi.github.io/Laravel-Unsplash-Wrapper/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shweshi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-10T16:05:04.000Z","updated_at":"2024-01-02T12:53:50.000Z","dependencies_parsed_at":"2022-08-23T17:50:33.888Z","dependency_job_id":null,"html_url":"https://github.com/shweshi/Laravel-Unsplash-Wrapper","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shweshi%2FLaravel-Unsplash-Wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shweshi%2FLaravel-Unsplash-Wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shweshi%2FLaravel-Unsplash-Wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shweshi%2FLaravel-Unsplash-Wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shweshi","download_url":"https://codeload.github.com/shweshi/Laravel-Unsplash-Wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238471963,"owners_count":19478136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","laravel","laravel-5-package","laravel-package","laravel-unsplash","laravel-unsplash-wrappser","laravel-wrapper","laravel5","php","unsplash","unsplash-api"],"created_at":"2024-09-24T13:50:38.053Z","updated_at":"2025-10-27T09:30:30.216Z","avatar_url":"https://github.com/shweshi.png","language":"PHP","funding_links":["https://www.buymeacoffee.com/shashi"],"categories":[],"sub_categories":[],"readme":"# LaravelUnsplashWrapper\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/shweshi/Laravel-Unsplash-Wrapper.svg?style=flat-square)](https://packagist.org/packages/shweshi/Laravel-Unsplash-Wrapper)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/shweshi/Laravel-Unsplash-Wrapper/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/shweshi/Laravel-Unsplash-Wrapper/?branch=master)\n[![StyleCI](https://styleci.io/repos/121030344/shield?branch=master)](https://styleci.io/repos/121030344)\n[![Build Status](https://scrutinizer-ci.com/g/shweshi/Laravel-Unsplash-Wrapper/badges/build.png?b=master)](https://scrutinizer-ci.com/g/shweshi/Laravel-Unsplash-Wrapper/build-status/master)\n[![Total Downloads](https://img.shields.io/packagist/dt/shweshi/Laravel-Unsplash-Wrapper.svg?style=flat-square)](https://packagist.org/packages/shweshi/Laravel-Unsplash-Wrapper)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fshweshi%2FLaravel-Unsplash-Wrapper.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fshweshi%2FLaravel-Unsplash-Wrapper?ref=badge_shield)\n\n**A Laravel wrapper for Unsplash.**\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require shweshi/laravel-unsplash-wrapper\n```\nIf you do not run Laravel 5.5 (or higher), then add the service provider in config/app.php:\n\n```\nshweshi\\LaravelUnsplashWrapper\\Providers\\UnsplashServiceProvider::class,\nshweshi\\LaravelUnsplashWrapper\\Providers\\UnsplashSearchServiceProvider::class,\nshweshi\\LaravelUnsplashWrapper\\Providers\\UnsplashUsersServiceProvider::class,\nshweshi\\LaravelUnsplashWrapper\\Providers\\UnsplashPhotosServiceProvider::class,\nshweshi\\LaravelUnsplashWrapper\\Providers\\UnsplashCollectionsServiceProvider::class,\n```\n\nIf you do run the package on Laravel 5.5+, package auto-discovery takes care of the magic of adding the service provider.\n\nNext under the alias array in config/app.php add\n\n```\n'UnsplashSearch' =\u003e shweshi\\LaravelUnsplashWrapper\\Facades\\UnsplashSearchFacade::class,\n'UnsplashUsers' =\u003e shweshi\\LaravelUnsplashWrapper\\Facades\\UnsplashUsersFacade::class,\n'UnsplashPhotos' =\u003e shweshi\\LaravelUnsplashWrapper\\Facades\\UnsplashPhotosFacade::class,\n'UnsplashCollections' =\u003e shweshi\\LaravelUnsplashWrapper\\Facades\\UnsplashCollectionsFacade::class,\n```\n\nYou must publish the configuration to provide your own service provider stub.\n\n``` bash\n$ php artisan vendor:publish --provider=\"shweshi\\LaravelUnsplashWrapper\\Providers\\UnsplashServiceProvider\"\n```\n\nUpdate your settings in the generated app/config/unsplash.php configuration file.\n```\nreturn [\n    'ApplicationID' =\u003e 'YOUR APPLICATION ACCES KEY HERE',\n];\n```\n## Usage\nSee documention for params and others at [unsplash docs](https://unsplash.com/documentation)\n\nList of methods: \n\n### Photos\n\n``` php\n\n$photos        = UnsplashPhotos::photos([]);          // list of all photos\n$photo         = UnsplashPhotos::single($id, $params);     // single photo\n$statistic     = UnsplashPhotos::statistic($id, $params);  // single photo statistics\n$downloadUrl   = UnsplashPhotos::download($id, $params);   // single photo download link\n$curatedPhotos = UnsplashPhotos::curated($params);         // list of curated photos\n$randomPhoto   = UnsplashPhotos::random($params);          // random photo\n```\n\n### Users\n\n``` php\nuse UnsplashUsers;\n\n$user         = UnsplashUsers::profile($username, $params);      // single user\n$portfolio    = UnsplashUsers::portfolio($username);             // single user's portfolio\n$photos       = UnsplashUsers::photos($username, $params);       // single user's photos\n$photos       = UnsplashUsers::likes($username, $params);        // single user's likes\n$collections  = UnsplashUsers::collections($username, $params);  // single user's collections\n$statistics   = UnsplashUsers::statistics($username, $params);   // single user's statistics\n```\n\n### Collections\n\n``` php\nuse UnsplashCollections;\n\n$collection  = UnsplashCollections::collections($params);    // list of all collections\n$collection  = UnsplashCollections::single($id, $params);    // single collections\n$photos      = UnsplashCollections::photos($id, $params);    // collection photos\n$statistic   = UnsplashCollections::statistic($id, $params); // single collections statistics\n$collection  = UnsplashCollections::curated($params);        // list of curated collections\n$collection  = UnsplashCollections::related($id, $params);   // list of related collections\n$collection  = UnsplashCollections::featured($params);       // list of featured collections\n```\n\n### Search\n\n``` php\nuse UnsplashSearch;\n\n$photos     = UnsplashSearch::photo($query, $params);\n$collection = UnsplashSearch::collection($query, $params);\n$user       = UnsplashSearch::user($query, $params);\n```\n\n### Example\n\n`echo UnsplashPhotos::photos(['page' =\u003e 1, 'order_by' =\u003e 'oldest']);`\n\nwill get you something like\n```json\nixlib=rb-0.3.5\\u0026q=80\\u0026fm=jpg\\u0026crop=faces\\u0026cs=tinysrgb\\u0026fit=crop\\u0026h=64\\u0026w=64\\u0026s=4ddd6656ddd74206872f45c033371087\",\"large\":\"https://images.unsplash.com/profile-1441298310363-3eb4b1feb829?\n.....\n```\nwhich you will need to format\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CODE OF CONDUCT](CODE_OF_CONDUCT.md) for details.\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fshweshi%2FLaravel-Unsplash-Wrapper.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fshweshi%2FLaravel-Unsplash-Wrapper?ref=badge_large)\n\n## Support\n\u003ca href=\"https://www.buymeacoffee.com/shashi\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e\n\n## Happy Coding!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshweshi%2Flaravel-unsplash-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshweshi%2Flaravel-unsplash-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshweshi%2Flaravel-unsplash-wrapper/lists"}