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(5mo ago)267↓33.3%MITHTMLPHP &gt;=8.0CI passing

Since Nov 24Pushed 5mo 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 1mo 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

34

—

LowBetter than 77% of packages

Maintenance70

Regular maintenance activity

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

176d 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

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41478.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

87117.5M63](/packages/bjeavons-zxcvbn-php)[illuminate/encryption

The Illuminate Encryption package.

9229.7M280](/packages/illuminate-encryption)[paragonie/hidden-string

Encapsulate strings in an object to hide them from stack traces

7410.6M39](/packages/paragonie-hidden-string)

PHPackages © 2026

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