定制 eelcol/laravel-helpers 二次开发

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

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

eelcol/laravel-helpers

最新稳定版本:1.1.1

Composer 安装命令:

composer require eelcol/laravel-helpers

包简介

Laravel helper functions.

关键字:

README 文档

README

Uploaded file

  • Directly save an uploaded file to the cloud. A new method saveToCloud is added to Illuminate\Http\UploadedFile.

string saveToCloud(string $folder, string $disk = null)

This method returns the URL of the file. When the file is saved to a local disk, a relative path is returned in stead of a complete URL.

Helper functions:

  • safe_array(array, ...keys) Retrieve a key from the array, when you do not know for sure that $array is really an array. Can be used with multiple levels: safe_array(array, level1, level2, etc)

  • safe_in_array(val, array) Check if a value is in array, when you do not know for sure that $array is an array

  • id_in_collection(id, collection) Check if an ID is present in a Eloquent collection

  • error(msg) Present an error message

  • success(msg) Present a success message

  • display_messages() Display the messages in HTML. In Blade, use: {!! display_messages() !!}

  • display_success(msg) Directly display a message in HTML. In Blade, use: {!! display_success('text') !!}

  • display_error(msg) Directly display a message in HTML. In Blade, use: {!! display_error('text') !!}

Messages can also be added by setting a session with key 'status'. This message will be printed as a success message.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固