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-10-27 15:14:42 |
Package Statistics | |
---|---|
Total Downloads: | 888 |
Monthly Downloads: | 6 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Easily set model columns as nullable - to send null on insert update when empty. For use when using foreign key, nullable, columns.
You can install the package most easily through composer
composer require arkitecht/laravel-nullable
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'...];
}
?>