Download the PHP package naqla/laravel-performance-lock without Composer

On this page you can find all versions of the php package naqla/laravel-performance-lock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-performance-lock

Laravel Performance Lock 🔒

Latest Version Total Downloads

A simple and elegant Laravel package that allows you to lock your entire website until client payment or any other condition is met. Perfect for freelancers and agencies who want to ensure payment before delivering the final product.

Features

Requirements

Installation

You can install the package via composer:

Publish Configuration

Publish the configuration file:

This will create a config/performance-lock.php file where you can customize the lock message and title.

Publish Views (Optional)

If you want to customize the lock page view:

This will publish the views to resources/views/vendor/performance-lock/locked.blade.php.

Configuration

Add these variables to your .env file (optional):

Usage

1. Apply Middleware

Apply the middleware to your routes that you want to protect:

Protect All Routes

In bootstrap/app.php (Laravel 11+):

Or in app/Http/Kernel.php (Laravel 10):

Protect Specific Routes

2. Lock/Unlock Methods

Using Built-in Routes

Lock the site:

Unlock the site (with secret code):

⚠️ Important: Change the secret code in your .env file:

Programmatically

Using API Endpoint

3. Artisan Commands (Optional)

Create custom Artisan commands for easier management:

Customization

Custom Lock Page

After publishing the views, edit resources/views/vendor/performance-lock/locked.blade.php:

Change Secret Code

Add your secret code to .env:

Or update config/performance-lock.php:

Custom Routes

You can disable the default routes by not loading them, and create your own:

Use Cases

How It Works

  1. The package creates a hidden .lock file in the vendor directory when locked
  2. Middleware checks for this file on each request
  3. If locked, users see a custom lock page (403 response)
  4. The unlock route bypasses the middleware
  5. Lock state persists even after deployment or server restart
  6. Lock metadata (timestamp, IP, user agent) is tracked automatically

Why Hidden File Instead of .env?

Security Considerations

Testing

The package automatically bypasses the lock for the toggle routes, allowing you to always access the unlock functionality.

API Reference

Available Methods

Troubleshooting

Site still accessible after locking

Make sure the middleware is properly registered and applied to your routes.

Can't unlock the site

Lock state not persisting

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Credits

License

The MIT License (MIT). Please see License File for more information.

Support

If you find this package helpful, please consider:


Made with ❤️ by AYOUB LAAOUAOUCHA


All versions of laravel-performance-lock with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2|^8.3
illuminate/support Version ^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package naqla/laravel-performance-lock contains the following files

Loading the files please wait ...