PHP code example of larapack / attribute-purging
1. Go to this page and download the library: Download larapack/attribute-purging library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
larapack / attribute-purging example snippets
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
//...
}