albertcht/lumen-helpers

支持Lumen中未受支持的Laravel特性。

v0.8 2019-09-29 14:00 UTC

This package is auto-updated.

Last update: 2024-08-29 04:20:08 UTC


README

php-badge packagist-badge Total Downloads

描述

它可用于提高实现兼容性,假设您计划在未来从Lumen迁移到Laravel。

此包不包括会话功能。

安装

如果使用composer,可以通过添加以下描述来引入:

composer require albertcht/lumen-helpers

如何使用

此包目前提供以下辅助函数:

  • mix
  • abort_if
  • abort_unless
  • action
  • app_path
  • asset
  • auth
  • back
  • bcrypt
  • cache
  • request
  • logger
  • method_field
  • mix
  • policy
  • public_path
  • config_path
  • report
  • validator
  • cookie

    它将直接返回 Symfony\Component\HttpFoundation\Cookie

  • app_with

    与makeWith调用对应的app()兼容辅助函数。 illuminate/container: 从5.4开始,您不能向make传递$parameters,而是makeWith已准备好,通过使用app_with,可以通过传递参数来执行make,这些参数是Lumen,illuminate / container版本请求的。