Download the PHP package adaptivemedia/laravel-site-lock without Composer

On this page you can find all versions of the php package adaptivemedia/laravel-site-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-site-lock

SiteLock - prevent access to your site

Sometimes you don't want anybody to access your site. Use cases include:

This package adds a global web middleware that protects all routes until it's unlocked.

Installation

You can install the package via composer:

You MUST publish the config file with:

This is the content of the config file:

Usage

Add the middleware to the $middlewareGroups array in App\Http\Kernel.php:

When added, all routes are locked if the request is on a matching environment. You can also assign this middleware to specific routes by adding an alias to the $routeMiddleware variable and then attaching that alias to a route.

Gain access via url

You can now gain access your site by visiting the configured url.

Gain access via IP

You can add allowed IP addresses in the allowed-ips config variable. You can either use a comma separated string:

or use an array:

To change allowed IPs without changing code, you can use your own env-variable, eg. SITE_LOCK_ALLOWED_IPS:

And set them in your .env:

Whitelist urls

You can whitelist individual urls so they are excluded from the middleware. A common use case could be a hook url that a third party service is calling in your app.

Disable site lock

If you don't want to enable site lock, just set the env variable SITE_LOCK_ENABLED to false.

Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

Support us

Adaptivemedia is a web agency based in Stockholm, Sweden. Visit our website.

License

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


All versions of laravel-site-lock with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
illuminate/support Version >7.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 adaptivemedia/laravel-site-lock contains the following files

Loading the files please wait ....