PHPackages                             phpno1/dictionary - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phpno1/dictionary

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phpno1/dictionary
=================

laravel data dictionary mapping

1.0.2(7y ago)114MITPHP

Since May 11Pushed 7y agoCompare

[ Source](https://github.com/yb19890724/dictionaries)[ Packagist](https://packagist.org/packages/phpno1/dictionary)[ RSS](/packages/phpno1-dictionary/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (4)Used By (0)

Laravel 数据字典扩展包
---------------

[](#laravel-数据字典扩展包)

### 功能

[](#功能)

数据映射字典转化。

### 官方扩展qq群

[](#官方扩展qq群)

```
qq:680531281

```

- [安装](#安装)
    - [使用要求](#使用要求)
    - [composer](#composer)
    - [laravel](#laravel)
- [配置](#配置)
    - [模型定义](#模型定义)
    - [设置字典](#设置字典)
- [方法](#方法)
- [数据转化](#数据转化)
    - [单个字段字典映射](#单个字段字典映射)
    - [多个字段字典映射](#多个字段字典映射)
- [注意事项](#注意事项)

### 使用要求

[](#使用要求)

- laravel &gt;= 5.\*
- php &gt;= 7

### composer

[](#composer)

执行以下命令获取包的最新版本:

```
    composer require phpno1/dictionary
```

### laravel

[](#laravel)

#### 生成配置文件

[](#生成配置文件)

```
    php artisan vendor:publish --provider "Phpno1\Dictionaries\Providers\DictionaryProvider"
```

#### &gt; = laravel5.5

[](#--laravel55)

ServiceProvider将自动附加

#### 其他版本

[](#其他版本)

```
'providers' => [
    Phpno1\Dictionaries\Providers\DictionaryProvider::class,
]
```

### 配置

[](#配置)

#### 模型定义

[](#模型定义)

```
