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.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle