2
2
3
3
# Laravel Encryptable
4
4
5
- [ ![ Latest Version on Packagist] ( https://img.shields.io/packagist/v/h-farm /laravel-encryptable.svg?style=flat-square )] ( https://packagist.org/packages/h-farm /laravel-encryptable )
6
- [ ![ GitHub Tests Action Status] ( https://img.shields.io/github/workflow/status/h-farm /laravel-encryptable/run-tests?label=tests )] ( https://github.com/h-farm /laravel-encryptable/actions?query=workflow%3ATests+branch%3Amaster )
7
- [ ![ GitHub Code Style Action Status] ( https://img.shields.io/github/workflow/status/h-farm /laravel-encryptable/Check%20&%20fix%20styling?label=code%20style )] ( https://github.com/h-farm /laravel-encryptable/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amaster )
8
- [ ![ Total Downloads] ( https://img.shields.io/packagist/dt/h-farm /laravel-encryptable.svg?style=flat-square )] ( https://packagist.org/packages/h-farm /laravel-encryptable )
5
+ [ ![ Latest Version on Packagist] ( https://img.shields.io/packagist/v/maize-tech /laravel-encryptable.svg?style=flat-square )] ( https://packagist.org/packages/maize-tech /laravel-encryptable )
6
+ [ ![ GitHub Tests Action Status] ( https://img.shields.io/github/workflow/status/maize-tech /laravel-encryptable/run-tests?label=tests )] ( https://github.com/maize-tech /laravel-encryptable/actions?query=workflow%3ATests+branch%3Amaster )
7
+ [ ![ GitHub Code Style Action Status] ( https://img.shields.io/github/workflow/status/maize-tech /laravel-encryptable/Check%20&%20fix%20styling?label=code%20style )] ( https://github.com/maize-tech /laravel-encryptable/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amaster )
8
+ [ ![ Total Downloads] ( https://img.shields.io/packagist/dt/maize-tech /laravel-encryptable.svg?style=flat-square )] ( https://packagist.org/packages/maize-tech /laravel-encryptable )
9
9
10
10
11
11
This package allows you to anonymize sensitive data (like the name, surname and email address of a user) similarly to Laravel's Encryption feature, but still have the ability to make direct queries to the database.
@@ -18,12 +18,12 @@ This package currently supports `MySQL` and `PostgreSQL` databases.
18
18
You can install the package via composer:
19
19
20
20
``` bash
21
- composer require h-farm /laravel-encryptable
21
+ composer require maize-tech /laravel-encryptable
22
22
```
23
23
24
24
You can publish the config file with:
25
25
``` bash
26
- php artisan vendor:publish --provider=" HFarm \Encryptable\EncryptableServiceProvider" --tag=" encryptable-config"
26
+ php artisan vendor:publish --provider=" Maize \Encryptable\EncryptableServiceProvider" --tag=" encryptable-config"
27
27
```
28
28
29
29
This is the content of the published config file:
@@ -68,7 +68,7 @@ To use the package, just add the `Encryptable` cast to all model attributes you
68
68
69
69
namespace App\Models;
70
70
71
- use HFarm \Encryptable\Encryptable;
71
+ use Maize \Encryptable\Encryptable;
72
72
use Illuminate\Database\Eloquent\Model;
73
73
74
74
class User extends Model
@@ -90,7 +90,7 @@ Once done, all values will be encrypted before being stored in the database, and
90
90
### Manually encrypt via PHP
91
91
92
92
``` php
93
- use HFarm \Encryptable\Encryption;
93
+ use Maize \Encryptable\Encryption;
94
94
95
95
$value = "your-decrypted-value";
96
96
@@ -100,7 +100,7 @@ $encrypted = Encryption::php()->encrypt($value); // returns the encrypted value
100
100
### Manually decrypt via PHP
101
101
102
102
``` php
103
- use HFarm \Encryptable\Encryption;
103
+ use Maize \Encryptable\Encryption;
104
104
105
105
$encrypted = "your-encrypted-value";
106
106
@@ -110,7 +110,7 @@ $value = Encryption::php()->decrypt($value); // returns the decrypted value
110
110
### Manually decrypt via DB
111
111
112
112
``` php
113
- use HFarm \Encryptable\Encryption;
113
+ use Maize \Encryptable\Encryption;
114
114
115
115
$encrypted = "your-encrypted-value";
116
116
@@ -124,7 +124,7 @@ You can use one of the two custom rules to check the uniqueness or existence of
124
124
` ExistsEncrypted ` is an extension of Laravel's ` Exists ` rule, whereas ` UniqueEncrypted ` is an extension of Laravel's ` Unique ` rule.
125
125
You can use them in the same way as Laravel's base rules:
126
126
``` php
127
- use HFarm \Encryptable\Rules\ExistsEncrypted;
127
+ use Maize \Encryptable\Rules\ExistsEncrypted;
128
128
use Illuminate\Support\Facades\Validator;
129
129
130
130
$data = [
@@ -142,7 +142,7 @@ Validator::make($data, [
142
142
```
143
143
144
144
``` php
145
- use HFarm \Encryptable\Rules\UniqueEncrypted;
145
+ use Maize \Encryptable\Rules\UniqueEncrypted;
146
146
use Illuminate\Support\Facades\Validator;
147
147
148
148
$data = [
0 commit comments