PHP code example of langleyfoxall / laravel-redacted-model
1. Go to this page and download the library: Download langleyfoxall/laravel-redacted-model 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/ */
langleyfoxall / laravel-redacted-model example snippets
class SensitiveModel extends RedactedModel
{
protected $redacted = ['name'];
}
class SensitiveModel extends RedactedModel
{
protected $redacted = ['name'];
public function shouldRedactField($key)
{
return !\Auth::user()->canSeeSensitiveFields();
}
}