Arkitecht / laravel-nullable by Arkitecht

Laravel 5 - Add nullable columns to models
890
0
2
Package Data
Maintainer Username: Arkitecht
Maintainer Contact: aaron@arkitech.net (Aaron Rubin)
Package Create Date: 2015-12-30
Package Last Update: 2024-07-08
Language: PHP
License: MIT
Last Refreshed: 2024-11-26 15:14:49
Package Statistics
Total Downloads: 890
Monthly Downloads: 2
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Laravel Nullable

Easily set model columns as nullable - to send null on insert update when empty. For use when using foreign key, nullable, columns.

Quick Installation

You can install the package most easily through composer

Laravel 5.1.x

composer require arkitecht/laravel-nullable

Using it in your model

To have the creator and updater automagically updated when a model is created and updated, just use the Attributions trait in your model.

<?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'...];
}
?>