arkitecht/laravel-nullable
最新稳定版本:5.1
Composer 安装命令:
composer require arkitecht/laravel-nullable
包简介
Laravel 5 - Add nullable columns to models
README 文档
README
Easily set model columns as nullable - to send null on insert and update when empty. For use when using foreign key, nullable, columns.
Quick Installation
You can install the package most easily through composer
composer require arkitecht/laravel-nullable
Using it in your model
Use the $nullable variable to define the nullable columns in your model. These will send null to the database when empty, rather than an empty string.
<?php namespace App; use Arkitecht\Nullable\Traits\Nullable; use Illuminate\Database\Eloquent\Model; class Test extends Model { use Nullable; protected $nullable = ['null_column_one','null_column_two'...]; } ?>
统计信息
- 总下载量: 939
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-12-30