2017 © Pedro Peláez
 

package attribute-purging

Allows you to define what attributes in your Eloquent Model which should be not be inserted into the database.

image

larapack/attribute-purging

Allows you to define what attributes in your Eloquent Model which should be not be inserted into the database.

  • Friday, June 8, 2018
  • by marktopper
  • Repository
  • 2 Watchers
  • 4 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 7 Versions
  • 48 % Grown

The README.md

attribute-purging

Allows you to define what attributes in your Eloquent Model which should be not be inserted into the database., (*1)

Installing

Install using Composer composer require larapack/attribute-purging., (*2)

Usage

First add the trait Purgeable to your Eloquent Model., (*3)

<?php

namespace App;

use Larapack\AttributePurging\Purgeable;

class User
{
  use Purgeable;

  /**
   * @var array List of attribute names which should be purged
   */ 
  protected $purge = ['foo']; // set the attribute names you which to purge

  //...
}

Test:, (*4)

$user = new App\User;
$user->foo = 'bar';
$user->save(); // The attribute 'foo' will not be saved to the database.
echo $user->foo; // Will still returns 'bar' as long you hold the same instance of the object.

The Versions

08/06 2018

dev-master

9999999-dev

Allows you to define what attributes in your Eloquent Model which should be not be inserted into the database.

  Sources   Download

MIT

The Requires

 

database laravel eloquent model db purge package save larapack

08/06 2018

v1.0.1

1.0.1.0

Allows you to define what attributes in your Eloquent Model which should be not be inserted into the database.

  Sources   Download

MIT

The Requires

 

database laravel eloquent model db purge package save larapack

08/06 2018

dev-laravel-56

dev-laravel-56

Allows you to define what attributes in your Eloquent Model which should be not be inserted into the database.

  Sources   Download

MIT

The Requires

 

database laravel eloquent model db purge package save larapack

26/11 2016

dev-laravel-5.1-package-shift

dev-laravel-5.1-package-shift

Allows you to define what attributes in your Eloquent Model which should be not be inserted into the database.

  Sources   Download

MIT

The Requires

 

database laravel eloquent model db purge package save larapack

04/03 2016

v1.0.x-dev

1.0.9999999.9999999-dev

Allows you to define what attributes in your Eloquent Model which should be not be inserted into the database.

  Sources   Download

MIT

database laravel eloquent model db purge package save larapack

04/03 2016

dev-develop

dev-develop

Allows you to define what attributes in your Eloquent Model which should be not be inserted into the database.

  Sources   Download

MIT

database laravel eloquent model db purge package save larapack

27/11 2015

v1.0.0

1.0.0.0

Allows you to define what attributes in your Eloquent Model which should be not be inserted into the database.

  Sources   Download

MIT

database laravel eloquent model db purge package save larapack