PHPackages                             galata-eth/laravel-code-protector - 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. galata-eth/laravel-code-protector

ActiveLibrary[Security](/categories/security)

galata-eth/laravel-code-protector
=================================

Laravel code protector: encrypt PHP files and load decrypted code at runtime (no Blade).

v1.1.0(8mo ago)2121↓79.7%MITHTMLPHP &gt;=8.0CI passing

Since Nov 24Pushed 8mo agoCompare

[ Source](https://github.com/Ghinkosa/Code-Encryption)[ Packagist](https://packagist.org/packages/galata-eth/laravel-code-protector)[ RSS](/packages/galata-eth-laravel-code-protector/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependenciesVersions (4)Used By (0)

🔐 Laravel Code Protector
========================

[](#-laravel-code-protector)

### Secure Laravel/PHP Code Encryption Package

[](#secure-laravelphp-code-encryption-package)

**By Galata Hinkosa (galata-eth)**

Laravel Code Protector is a powerful package designed to **encrypt your PHP source code**, generate **secure runtime stubs**, and **protect your intellectual property** when deploying Laravel applications.

This package ensures your project runs normally while preventing anyone from accessing or modifying your actual PHP code.

---

🏆 Features
----------

[](#-features)

- ✔ **AES-256-CBC encryption** for all PHP source files
- ✔ Generates `.galo` encrypted payloads
- ✔ Replaces real code with tiny *loader stubs*
- ✔ Decrypts only in memory (`eval`)
- ✔ Original code never gets exposed
- ✔ Works on **Windows, Linux, macOS**
- ✔ Compatible with Laravel 8, 9, 10, 11
- ✔ Skips Blade files to avoid breaking views
- ✔ Secure, fast, and production-ready

---

📦 Installation
--------------

[](#-installation)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require galata-eth/laravel-code-protector

# Laravel Code Protector (no Blade)

This package encrypts PHP files under configured paths and replaces original files with a small stub that triggers runtime decryption.

**How it works**

- `php artisan code:encrypt` encrypts files and writes `.galo` payloads beside originals and replaces original `.php` with a small stub.
- At runtime the stub calls `GalataEth\CodeProtect\Loader::loadFromStub(__FILE__)`, which decrypts the `.galo` file and `eval()`s the PHP code in memory (no persistent decrypted files by default).

**Install**
1. Take backup.
2. Place package in `packages/galata-eth/laravel-code-protector` or use path repository in composer.json.
3. `composer require galata-eth/laravel-code-protector:dev-main`
4. `php artisan vendor:publish --tag=config`
5. Set `CODE_PROTECT_KEY` or ensure `APP_KEY` is set.
6. `php artisan code:encrypt`

**Notes**

- This package purposely skips Blade view encryption.
- Keep backups of originals before encrypting.
=======
# Code-Encryption
Laravel code Encription
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance59

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

267d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/88423282?v=4)[Ghinkosa](/maintainers/Ghinkosa)[@Ghinkosa](https://github.com/Ghinkosa)

---

Top Contributors

[![Ghinkosa](https://avatars.githubusercontent.com/u/88423282?v=4)](https://github.com/Ghinkosa "Ghinkosa (1 commits)")

### Embed Badge

![Health badge](/badges/galata-eth-laravel-code-protector/health.svg)

```
[![Health](https://phpackages.com/badges/galata-eth-laravel-code-protector/health.svg)](https://phpackages.com/packages/galata-eth-laravel-code-protector)
```

###  Alternatives

[phpids/phpids

PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

791150.0k2](/packages/phpids-phpids)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k44](/packages/paragonie-ecc)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

4912.6k](/packages/nicobleiler-php-passphrase)[dwgebler/encryption

Encryption wrapper for PHP using libsodium — simple API for symmetric and asymmetric encryption, password hashing, digital signing, and message authentication.

317.5k](/packages/dwgebler-encryption)

PHPackages © 2026

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