Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Decrypt Laravel Package

oleander29/decrypt

View on GitHub
Deep Wiki
Context7

Decrypt

This is a little laravel package which takes a collection or an Eloquent model and decrypts the fields of either every model in the collection which are defined in the $encryptable variable in your model(read below) or a model depending of what function you use, it returns the model or collection as an array, so it is mostly usable when wanting to return some json like if you are creating an API, all you need to do is encode it.

Installation

To install just add this to your composer.json "oleander29/decrypt": "dev-master" then run composer update.

After this add the service provider to the config/app.php file like so Oleander29\Decrypt\DecryptServiceProvider::class

And lastly add an alias in the same file(config/app.php) like so 'Decrypt' => 'Oleander29\Decrypt\DecryptServiceFacade'

Remember to add a variable to your model so the package can see what fields it can decrypt and what it should not, you need to add the following variable:

protected $encryptable = [ 'field1', 'field2', ];

To use the decrypter and it's functions just add use Decrypt; on top of your file, and you can then use the following functions like so:

  • Decrypt::collection($collection);
  • Decrypt::model($model);
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi