定制 krafthaus/name-generator 二次开发

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

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

krafthaus/name-generator

Composer 安装命令:

composer require krafthaus/name-generator

包简介

Name generator for your next Laravel project.

README 文档

README

Total Downloads Build Status License StyleCI

Installation

Add name-generator to your composer.json file:

"require": {
    "krafthaus/name-generator": "^1.0"
}

Use composer to install the package:

$ composer update

Register the package:

'providers' => [
    // ...
    KraftHaus\NameGenerator\NameGeneratorServiceProvider::class,
]

Publish the configuration files:

$ php artisan vendor:publish --provider="KraftHaus\NameGenerator\NameGeneratorServiceProvider" --tag=config

Usage

Generate a string of random words:

$words = KraftHaus\NameGenerator\Facades\Generator::generate();
// output: word1 word2

// Or define the amount of words you'd like to output:
$words = KraftHaus\NameGenerator\Facades\Generator::generate(5);
// output: word1 word2 word3 word4 word5

// With the glue parameter:
$words = KraftHaus\NameGenerator\Facades\Generator::generate(3, '-');
// output: word1-word2-word3

Generate an array of random words:

$words = KraftHaus\NameGenerator\Facades\Generator::raw();
// output: ['word1', 'word2'];

// Or define the amount of words you'd like to output:
$words = KraftHaus\NameGenerator\Facades\Generator::raw(4);
// output: ['word1', 'word2', 'word3', 'word4'];

License

This package is available under the MIT license.

Copyright (c) 2017 KraftHaus

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固