定制 moezmissaoui/quotes 二次开发

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

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

moezmissaoui/quotes

最新稳定版本:v0.0.1-alpha

Composer 安装命令:

composer require moezmissaoui/quotes

包简介

Quotes is a simple package to generate a random quotes

README 文档

README

This is a simple laravel package. It can be an exemple to learn how to create laravel package. This package called quotes. If someone installs this in their Laravel project, they'll receive a random inspirational quote upon visiting the /quote/{mode?} route. You'll get the quotes from the zenquotes.io/api/random API.

Installation

Execute the following command to install the package:

    composer require MoezMissaoui/quotes

How to use

    {base_url}/quote/{mode?}

There is 3 modes:

  • quotes : Generate a JSON array of 50 random quotes on each request.
  • today : Generate the quote of the day on each request.
  • random : Generate a random quote on each request.
  • by default (/quote) [mode param is not required] : It will be random mode.

Conclusion

I would like to thank you for trying my implementation for this simple package. I hope you've enjoyed it and have learned some useful stuff regarding Laravel custom package development. Although in real life, packages can be much more complicated than this, the ideas should be more or less the same. If you’re stuck somewhere, feel free to reach out on LinkedIn.

About

Requirements

  • PHP 7.* or newer
  • guzzlehttp/guzzle ^7.5

License

MIT

统计信息

  • 总下载量: 26
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固