定制 mahdimajidzadeh/laravel-unsplash 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mahdimajidzadeh/laravel-unsplash

Composer 安装命令:

composer require mahdimajidzadeh/laravel-unsplash

包简介

Laravel package for Unsplash Api

README 文档

README

StyleCI

This package contain pulic actions

Install

Via Composer

$ composer require mahdimajidzadeh/laravel-unsplash

If you do not run Laravel 5.5 (or higher), then add the service provider in config/app.php:

MahdiMajidzadeh\LaravelUnsplash\LaravelUnsplashServiceProvider::class

If you do run the package on Laravel 5.5+, package auto-discovery takes care of the magic of adding the service provider.

You must publish the configuration to provide an own service provider stub.

$ php artisan vendor:publish --provider="MahdiMajidzadeh\LaravelUnsplash\LaravelUnsplashServiceProvider"

Usage

See documention for params and others at unsplash docs

List of methods:

Photos

$unsplash  = new MahdiMajidzadeh\LaravelUnsplash\Photo();
$photos    = $unsplash->photos($params)->get();          // list of all photos
$photo     = $unsplash->single($id, $params)->get();     // single photo
$statistic = $unsplash->statistic($id, $params)->get();  // single photo statistics
$link      = $unsplash->download($id);                   // single photo download link
$photos    = $unsplash->curated($params)->get();         // list of curated photos
$photo     = $unsplash->random($params)->get();          // random photo

notice: you can use getArray() instead of get() to get array of result.

notice: single($id, $params) and random($params) have getID() and getURL() methods to get ID and URL for using in <img> tag.

$photos = $unsplash->random($params)->getURL(); // return https://source.unsplash.com/WLUHO9A_xik/1600x900

Users

$unsplash     = new MahdiMajidzadeh\LaravelUnsplash\User();
$user         = $unsplash->single($username, $params)->get();       // single user
$portfolio    = $unsplash->portfolio($username);                    // single user's portfolio
$photos       = $unsplash->photos($username, $params)->get();       // single user's photos
$photos       = $unsplash->likes($username, $params)->get();        // single user's likes
$collections  = $unsplash->collections($username, $params)->get();  // single user's collections
$statistics   = $unsplash->statistics($username, $params)->get();   // single user's statistics

notice: you can use getArray() instead of get() to get array of result.

Collections

$unsplash    = new MahdiMajidzadeh\LaravelUnsplash\Collection();
$collection  = $unsplash->collections($params)->get(); // list of all collections
$collection  = $unsplash->single($id)->get(); // single collections
$photos      = $unsplash->photos($id, $params)->get(); // collection photos
$statistic   = $unsplash->statistic($id, $params)->get(); // single collections statistics
$collection  = $unsplash->curated($params)->get(); // list of curated collections
$collection  = $unsplash->related($id)->get(); // list of related collections
$collection  = $unsplash->featured($params)->get(); // list of featured collections

notice: you can use getArray() instead of get() to get array of result.

Search

$unsplash   = new MahdiMajidzadeh\LaravelUnsplash\Search();
$photos     = $unsplash->photo($query, $params)->get();
$collection = $unsplash->collection($query, $params)->get();
$user       = $unsplash->user($query, $params)->get();

notice: you can use getArray() instead of get() to get array of result.

mahdimajidzadeh/laravel-unsplash 适用场景与选型建议

mahdimajidzadeh/laravel-unsplash 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.36k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2018 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「api」 「laravel」 「photo」 「Unsplash」 「laravel-package」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 mahdimajidzadeh/laravel-unsplash 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mahdimajidzadeh/laravel-unsplash 我们能提供哪些服务?
定制开发 / 二次开发

基于 mahdimajidzadeh/laravel-unsplash 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 11.36k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-04