nechin/laravel-helpers
最新稳定版本:1.1.0
Composer 安装命令:
composer create-project nechin/laravel-helpers
包简介
Added new helper methods to a facades
README 文档
README
About
Laravel helpers package that extends a different facades
Installation
The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:
composer require nechin/laravel-helpers
Requirements
Laravel 5.4 PHP 8.0
Examples
Method fileExt for the Str facade, that return a file extension by the file path
\Illuminate\Support\Str::fileExt('path\to\file.ext'); // "ext"
Method randomParts for the Str facade, that return a string with random generated parts of string separated by the separator
\Illuminate\Support\Str::randomParts(4, 5, '+'); // "RnHxg+R9i1r+3F3P8+HJ9FT"
Method redirectList for the Route facade, that adds the ability to specify a list of a redirects
// routes/web.php \Illuminate\Routing\Route::redirectList([ '/from' => '/to' ]);
Method delete for the Arr facade, that delete elements by the value
$array = [1, 2, '1', 3]; \Illuminate\Support\Arr::delete($array, 1); // [2, 3] \Illuminate\Support\Arr::delete($array, 1, true); // [2, '1', 3]
Method pullAll for the Arr facade, that getting array elements by value
$array = [1, 2, 'foo' => '1', 3]; \Illuminate\Support\Arr::pullAll($array, 1); // [0 => 1, 'foo' => 1] \Illuminate\Support\Arr::pullAll($array, 1, true); // [0 => 1]
Method pullFirst for the Arr facade, that getting first array element by value
$array = [1, 2, 'foo' => '3', 3]; \Illuminate\Support\Arr::pullFirst($array, 3); // ['foo' => 3] \Illuminate\Support\Arr::pullFirst($array, 3, true); // [2 => 3]
Copyright and license
The nechin/laravel-helpers library is copyright © Alexander Vitkalov and licensed for use under the MIT License (MIT). Please see LICENSE for more information.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-16