All Projects → elic-dev → laravel-site-protection

elic-dev / laravel-site-protection

Licence: MIT license
Protect your site with a simple password form

Programming Languages

PHP
23972 projects - #3 most used programming language
Blade
752 projects

Projects that are alternatives of or similar to laravel-site-protection

laravel-user-notifications
User notifications for Laravel 5+
Stars: ✭ 24 (-36.84%)
Mutual labels:  laravel-5-package
voyager-page-blocks
A module to provide page blocks for Voyager 📝
Stars: ✭ 80 (+110.53%)
Mutual labels:  laravel-5-package
laravel-vue-component
A Blade directive to ease up Vue workflow for Laravel projects
Stars: ✭ 19 (-50%)
Mutual labels:  laravel-5-package
laravel-zend-acl
Adds ACL to Laravel via Zend\Permissions\Acl component.
Stars: ✭ 41 (+7.89%)
Mutual labels:  laravel-5-package
laravel-ses
A Laravel Package that allows you to get simple sending statistics for emails you send through SES, including deliveries, opens, bounces, complaints and link tracking
Stars: ✭ 39 (+2.63%)
Mutual labels:  laravel-5-package
laravel-payfort
Laravel Payfort provides a simple and rich way to perform and handle operations for Payfort online payment gateway
Stars: ✭ 14 (-63.16%)
Mutual labels:  laravel-5-package
Laravel-pushover
A Laravel wrapper for Pushover. Pushover makes it easy to get real-time notifications on your Android, iPhone, iPad, and Desktop (Pebble, Android Wear, and Apple watches, too!)
Stars: ✭ 49 (+28.95%)
Mutual labels:  laravel-5-package
magic-box
A magical implementation of Laravel's Eloquent models as injectable, masked resource repositories.
Stars: ✭ 46 (+21.05%)
Mutual labels:  laravel-5-package
laravel-admin-lte
Easy AdminLTE integration with Laravel and laravel mix friendly.
Stars: ✭ 25 (-34.21%)
Mutual labels:  laravel-5-package
sweetalert
Laravel 5 Package for SweetAlert2. Use this package to easily show sweetalert2 prompts in your laravel app.
Stars: ✭ 28 (-26.32%)
Mutual labels:  laravel-5-package
LARAVEL-PDF-VIEWER
A Laravel Package for viewing PDF files or documents on the web without leaving your Web Application
Stars: ✭ 80 (+110.53%)
Mutual labels:  laravel-5-package
voyager-portfolio
A Portfolio Module for Laravel Voyager 💋
Stars: ✭ 15 (-60.53%)
Mutual labels:  laravel-5-package
Laralang
This package lets you translate any string to multiple languages easily in laravel 5.4
Stars: ✭ 45 (+18.42%)
Mutual labels:  laravel-5-package
laravel-form-builder
laravel专用表单生成器,快速生成现代化的form表单。包含复选框、单选框、输入框、下拉选择框等元素以及,省市区三级联动,时间选择,日期选择,颜色选择,树型,文件/图片上传等功能。
Stars: ✭ 59 (+55.26%)
Mutual labels:  laravel-5-package
baserepo
Base repository
Stars: ✭ 71 (+86.84%)
Mutual labels:  laravel-5-package
laravel-dynamodb-session-driver
DynamoDB Session Driver for Laravel 5
Stars: ✭ 15 (-60.53%)
Mutual labels:  laravel-5-package
laravel-ab
Laravel A/B experiment testing tool
Stars: ✭ 108 (+184.21%)
Mutual labels:  laravel-5-package
querydumper
Laravel package to dump all running queries on the page.
Stars: ✭ 24 (-36.84%)
Mutual labels:  laravel-5-package
laravel-decorator
Easily decorate your method calls with laravel-decorator package
Stars: ✭ 125 (+228.95%)
Mutual labels:  laravel-5-package
laravel-sms
Laravel 贴合实际需求同时满足多种通道的短信发送组件
Stars: ✭ 67 (+76.32%)
Mutual labels:  laravel-5-package

Very simple site wide password protection for Laravel5

This will add a simple password form in front of your application to protected it from any access. The password is specified using the .env file to protect DEV or STAGE sites only.

You can use multiple passwords for different user groups. Once the password is removed, the access is revoked.

This does not protect any assets files like css or images.

Looks like

SiteProtection

Installation

composer require elic-dev/laravel-site-protection

Laravel >= 5.2

This package requires at least the Laravel Framework of version 5.2.

Add ServiceProvider to the providers array in app/config/app.php.

ElicDev\SiteProtection\SiteProtectionServiceProvider::class,

Laravel >= 5.5

You don't need to add this package to your app/config/app.php since it supports auto discovery.

Add Middleware

Add Middleware to app/Http/Kernel.php or specific routes you want to protect.

protected $middlewareGroups = [
    'web' => [
        ...
        \ElicDev\SiteProtection\Http\Middleware\SiteProtection::class,
    ],
    ...
];

Configuration

Most configuration can be done using ENV variables by adding the following keys to your .env file.

Adjusting the passwords

You can use multiple passwords separated by comma.

SITE_PROTECTION_PASSWORDS=password1,password2

To revoke access to your site simply change the password. This requires every user using the old password to re-enter a password.

Exclude certain paths from protection

You can exclude specific paths from protection. Add a comma seperated list of paths to your .env file. You can use the * to exclude a group of paths.

SITE_PROTECTION_EXCEPT_PATHS=path1,path2,login*

Protect only specific paths

You can protect only some paths. Add a comma seperated list of paths to your .env file. You can use the * to protect a a group of paths.

SITE_PROTECTION_PROTECTED_ONLY_PATHS=path1,path2,admin*

Set a CSS file uri

You can change the look and feel of the password protection page by adding an uri to your main css file. The css file is appened to the existing css styles to keep basic alignments.

SITE_PROTECTION_CSS_FILE_URI=/assets/app.css

Customization

In case you really need to. You can modify the view that handles password entry by publishing the views to your resource folder. This is not recommended and might cause problems on future updates. Try using the uri to a css file first.

Run the following command:

php artisan vendor:publish --provider="ElicDev\SiteProtection\SiteProtectionServiceProvider" --tag=views

You can now make the changes in resources/vendor/views/site-protection/site-protection-form.blade.php.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].