PHPackages                             james.rus52/laravel-source-encrypter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. james.rus52/laravel-source-encrypter

ActiveLibrary[Security](/categories/security)

james.rus52/laravel-source-encrypter
====================================

Laravel Source Encrypter

13.0.0(1mo ago)013MITPHPPHP &gt;=7.2.5

Since May 15Pushed 1mo agoCompare

[ Source](https://github.com/jamesRUS52/Laravel-Source-Encrypter)[ Packagist](https://packagist.org/packages/james.rus52/laravel-source-encrypter)[ RSS](/packages/jamesrus52-laravel-source-encrypter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

Laravel Source Encrypter
========================

[](#laravel-source-encrypter)

[![StyleCI](https://camo.githubusercontent.com/1f4d52278b32b1f405db44243e92a5422805d0eb11637c8e7dc16146a5ae2389/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3234383437393632372f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/248479627)[![Latest Stable Version](https://camo.githubusercontent.com/3d16fbcdecc551d0dd56d1599f01cb5a63397e006ae48d650125feadf58cc815/68747470733a2f2f706f7365722e707567782e6f72672f7362616d74722f6c61726176656c2d736f757263652d656e637279707465722f762f737461626c65)](https://packagist.org/packages/sbamtr/laravel-source-encrypter)[![License](https://camo.githubusercontent.com/3522da5a176ad4cb066ee4ccaba753271fa8297a5402233aa9154444d9d8fdbf/68747470733a2f2f706f7365722e707567782e6f72672f7362616d74722f6c61726176656c2d736f757263652d656e637279707465722f6c6963656e7365)](https://github.com/SiavashBamshadnia/Laravel-Source-Encrypter)[![CodeFactor](https://camo.githubusercontent.com/3a0d72676681d0205a7cae39a241c43ce3ebb41c082e91d2d079d21385cd5103/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f7369617661736862616d736861646e69612f6c61726176656c2d736f757263652d656e637279707465722f6261646765)](https://www.codefactor.io/repository/github/siavashbamshadnia/laravel-source-encrypter)

[![](cover.jpg)](cover.jpg)

This package encrypts your php code with [phpBolt](https://phpbolt.com)

*For Laravel and Lumen 6, 7, 8, 9*

- [Installation](#installation)
- [Usage](#usage)

Installation
------------

[](#installation)

### Step 1

[](#step-1)

At the first, You have to [install phpBolt](https://phpbolt.com/download-phpbolt/).

### Step 2

[](#step-2)

Require the package with composer using the following command:

```
composer require --dev james.rus52/laravel-source-encrypter
```

### Step 3

[](#step-3)

#### For Laravel

[](#for-laravel)

The service provider will automatically get registered. Or you may manually add the service provider in your `config/app.php` file:

```
'providers' => [
    // ...
    \sbamtr\LaravelSourceEncrypter\SourceEncryptServiceProvider::class,
];
```

#### For Lumen

[](#for-lumen)

Add this line of code under the `Register Service Providers` section of your `bootstrap/app.php`:

```
$app->register(\sbamtr\LaravelSourceEncrypter\SourceEncryptServiceProvider::class);
```

### Step 4 (Optional)

[](#step-4-optional)

You can publish the config file with this following command:

```
php artisan vendor:publish --provider="sbamtr\LaravelSourceEncrypter\SourceEncryptServiceProvider" --tag=config
```

**Note:** If you are using Lumen, you have to use [this package](https://github.com/laravelista/lumen-vendor-publish).

Usage
-----

[](#usage)

Open terminal in project root and run this command:

```
php artisan encrypt-source
```

This command encrypts files and directories in `config/source-encrypter.php` file. Default values are `app`, `database`, `routes`.

The default destination directory is `encrypted`. You can change it in `config/source-encrypter.php` file.

Also the default encryption key length is `6`. You can change it in `config/source-encrypter.php` file. `6` is the recommended key length.

This command has these optional options:

OptionDescriptionExamplesourcePath(s) to encryptapp,routes,public/a.phpdestinationDestination directoryencryptedkeylengthEncryption key length6forceForce the operation to run when destination directory already exists### Usage Examples

[](#usage-examples)

CommandDescription`php artisan encrypt-source`Encrypts with default source, destination and keylength. If the destination directory exists, asks for delete it.`php artisan encrypt-source --force`Encrypts with default source, destination and keylength. If the destination directory exists, deletes it.`php artisan encrypt-source --source=app`Encrypts `app` directory to the default destination with default keylength.`php artisan encrypt-source --destination=dist`Encrypts with default source and key length to `dist` directory.`php artisan encrypt-source --destination=dist --keylength=8`Encrypts default source to `dist` directory and the encryption key length is `8`.Written with ♥ by Siavash Bamshadnia.

Please support me by staring this repository.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 85% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~338 days

Total

3

Last Release

50d ago

Major Versions

11.0.0 → 12.0.02025-04-25

12.0.0 → 13.0.02026-03-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/a64ca777106023ca0997b82cf8bce53932d67b442b16154d859bbd15fe9f2171?d=identicon)[jamesRUS52](/maintainers/jamesRUS52)

---

Top Contributors

[![SiavashBamshadnia](https://avatars.githubusercontent.com/u/3998368?v=4)](https://github.com/SiavashBamshadnia "SiavashBamshadnia (34 commits)")[![jamesRUS52](https://avatars.githubusercontent.com/u/39707635?v=4)](https://github.com/jamesRUS52 "jamesRUS52 (6 commits)")

---

Tags

laravelencryptionlumenencryptsourceencrypterioncubeencryptorphpBolt

### Embed Badge

![Health badge](/badges/jamesrus52-laravel-source-encrypter/health.svg)

```
[![Health](https://phpackages.com/badges/jamesrus52-laravel-source-encrypter/health.svg)](https://phpackages.com/packages/jamesrus52-laravel-source-encrypter)
```

###  Alternatives

[sbamtr/laravel-source-encrypter

Laravel Source Encrypter

58545.6k](/packages/sbamtr-laravel-source-encrypter)[daanra/laravel-lets-encrypt

A Laravel package to easily generate SSL certificates using Let's Encrypt

22650.9k](/packages/daanra-laravel-lets-encrypt)[ercsctt/laravel-file-encryption

Secure file encryption and decryption for Laravel applications

642.6k](/packages/ercsctt-laravel-file-encryption)[dolphiq/laravel-aescrypt

AES encrypt and decrypt Eloquent attributes inspired by elocryptfive

171.7k](/packages/dolphiq-laravel-aescrypt)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
