定制 human018/smart-name 二次开发

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

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

human018/smart-name

Composer 安装命令:

composer create-project human018/smart-name

包简介

A Model Trait that quickly & intuitively change names from a full name into separate first, last and other name parts.

README 文档

README

A Model Trait that quickly & intuitively change names from a full name into separate first, last and other name parts.

Prerequisites

This Trait uses the Laravel framework and requires Laravel 5 and above.

It also requires that your model table has columns named 'first_name', 'last_name' and 'title' in order to process the name.

Installing

Add the package to your composer file.

composer require Human018/laravel-smart-name

Add the trait to any Model you wish to apply it to.

use Human018\SmartName\Traits\SmartNameTrait;

class User {
    use SmartNameTrait;
}

This introduces a new attribute method to your model called name.

$user->name = "Mr John Doe";

// Will perform the following:

$user->title = "Mr";
$user->first_name = "John";
$user->last_name = "Doe";

$user->name; // returns "Mr John Doe";

This trait also processes email addresses if it detects the value to be an email address.

$user->name = "john@mail.com"

// Will perform the following:

$user->first_name = "john";

Authors

  • Simon Woodard - Initial work - Website

License

This project is licensed under the GNU License - see the LICENSE.md file for details

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2021-01-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固