Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
foxws committed Jun 22, 2023
1 parent 5cf61b3 commit beb148b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 33 deletions.
46 changes: 14 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# This is my package livewire-encrypt
# Encrypt Livewire memo data

[![Latest Version on Packagist](https://img.shields.io/packagist/v/foxws/livewire-encrypt.svg?style=flat-square)](https://packagist.org/packages/foxws/livewire-encrypt)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/foxws/livewire-encrypt/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/foxws/livewire-encrypt/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/foxws/livewire-encrypt/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/foxws/livewire-encrypt/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/foxws/livewire-encrypt.svg?style=flat-square)](https://packagist.org/packages/foxws/livewire-encrypt)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
## Description

## Support us
By default Livewire exposes database connection details. See the following [discussion](https://github.com/livewire/livewire/discussions/2627) for details.

[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/livewire-encrypt.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/livewire-encrypt)
This package encrypts the `dataMeta.models` response, so your database details cannot be retrieved.

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
> **NOTE:** This package is a POC and comes without any warranty it actually works.
## Installation

Expand All @@ -23,37 +21,21 @@ You can install the package via composer:
composer require foxws/livewire-encrypt
```

You can publish and run the migrations with:
This package should auto-register and overrule the Livewire `HydratePublicProperties` class.

```bash
php artisan vendor:publish --tag="livewire-encrypt-migrations"
php artisan migrate
```
### Filament

You can publish the config file with:
By default Livewire exposes all public properties to the view.

```bash
php artisan vendor:publish --tag="livewire-encrypt-config"
```

This is the contents of the published config file:
When using route binding, one may want to overrule the `id` attribute, to hide this from the public:

```php
return [
];
```
protected function mutateFormDataBeforeFill(array $data): array
{
$data['id'] = $data['prefixed_id']; // slug, uuid, ..

Optionally, you can publish the views using

```bash
php artisan vendor:publish --tag="livewire-encrypt-views"
```

## Usage

```php
$livewireEncrypt = new Foxws\LivewireEncrypt();
echo $livewireEncrypt->echoPhrase('Hello, Foxws!');
return $data;
}
```

## Testing
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"foxws",
"laravel",
"livewire",
"livewire-encrypt"
"livewire-encrypt",
"livewire-encryption"
],
"homepage": "https://github.com/foxws/livewire-encrypt",
"license": "MIT",
Expand Down

0 comments on commit beb148b

Please sign in to comment.