PHPackages                             sbamtr/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. sbamtr/laravel-source-encrypter

ActiveLibrary[Security](/categories/security)

sbamtr/laravel-source-encrypter
===============================

Laravel Source Encrypter

1.6.0(10mo ago)58549.7k↓21.2%142[21 issues](https://github.com/SiavashBamshadnia/Laravel-Source-Encrypter/issues)MITPHPPHP &gt;=7.2.5

Since Mar 19Pushed 10mo ago20 watchersCompare

[ Source](https://github.com/SiavashBamshadnia/Laravel-Source-Encrypter)[ Packagist](https://packagist.org/packages/sbamtr/laravel-source-encrypter)[ RSS](/packages/sbamtr-laravel-source-encrypter/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (1)Versions (12)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 sbamtr/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

50

—

FairBetter than 95% of packages

Maintenance53

Moderate activity, may be stable

Popularity52

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% 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 ~224 days

Recently: every ~414 days

Total

10

Last Release

322d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.1

1.3.0PHP &gt;=7.2.5

### Community

Maintainers

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

---

Top Contributors

[![SiavashBamshadnia](https://avatars.githubusercontent.com/u/3998368?v=4)](https://github.com/SiavashBamshadnia "SiavashBamshadnia (36 commits)")[![ionikdev](https://avatars.githubusercontent.com/u/47270092?v=4)](https://github.com/ionikdev "ionikdev (1 commits)")[![jamesRUS52](https://avatars.githubusercontent.com/u/39707635?v=4)](https://github.com/jamesRUS52 "jamesRUS52 (1 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

encryptencryptionioncubelaravellaravel-packagelumenlumen-packagephpphpboltlaravelencryptionlumenencryptsourceencrypterioncubeencryptorphpBolt

### Embed Badge

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

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

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M327](/packages/laravel-ai)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)

PHPackages © 2026

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