arkitecht/laravel-nullable 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-12-30