Skip to content

Commit

Permalink
Merge pull request #61 from alissn/ReadFromEnv
Browse files Browse the repository at this point in the history
Addition of `permit_empty` Configuration to README
  • Loading branch information
freekmurze authored Jan 20, 2024
2 parents 53ba8bd + 8d28019 commit 0a1649b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ return [
'key' => env('CIPHERSWEET_KEY'),
],
],

/*
* The provided code snippet checks whether the $permitEmpty property is set to false
* for a given field. If it is not set to false, it throws an EmptyFieldException indicating
* that the field is not defined in the row. This ensures that the code enforces the requirement for
* the field to have a value and alerts the user if it is empty or undefined.
* Supported: "true", "false"
*/
'permit_empty' => env('CIPHERSWEET_PERMIT_EMPTY', FALSE)

];
```

Expand Down
5 changes: 3 additions & 2 deletions config/ciphersweet.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@
],
// 'custom' => CustomKeyProviderFactory::class,
],
/**

/*
* The provided code snippet checks whether the $permitEmpty property is set to false
* for a given field. If it is not set to false, it throws an EmptyFieldException indicating
* that the field is not defined in the row. This ensures that the code enforces the requirement for
* the field to have a value and alerts the user if it is empty or undefined.
* Supported: "true", "false"
*/
'permit_empty' => false
'permit_empty' => env('CIPHERSWEET_PERMIT_EMPTY', FALSE)
];

0 comments on commit 0a1649b

Please sign in to comment.