Package Data | |
---|---|
Maintainer Username: | 865826021 |
Maintainer Contact: | 865826021@qq.com (yu xiao yang) |
Package Create Date: | 2017-04-15 |
Package Last Update: | 2017-04-15 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-02-09 15:01:03 |
Package Statistics | |
---|---|
Total Downloads: | 9 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
composer require yuxiaoyang/rander
或者在你的 composer.json
的 require 部分中添加:
"yuxiaoyang/rander": "~1.0"
下载完毕之后,直接配置 config/app.php
的 providers
:
//Illuminate\Hashing\HashServiceProvider::class,
Yuxiaoyang\Rander\RanderProvider::class,
控制器中使用 IndexController.php
:
<?php
use \Yuxiaoyang\Rander\Rander;
class IndexController extends Controller
{
public $rand;
public function index(Request $request)
{
//$this->rand = new \Yuxiaoyang\Rander\Rander();
$this->rand = new Rander();
//make($num) $num为需要生成的字符串长度
echo $this->rand->make(5);
}
}