All Projects → spatie → Laravel Littlegatekeeper

spatie / Laravel Littlegatekeeper

Licence: mit
Protect pages from access with a universal username/password

Projects that are alternatives of or similar to Laravel Littlegatekeeper

Wizard
Wizard是一款开源的文档管理工具,支持Markdown/Swagger/Table类型的文档。
Stars: ✭ 1,733 (+1286.4%)
Mutual labels:  laravel
Backup Manager
Database backup manager for dumping to and restoring databases from S3, Dropbox, FTP, SFTP, and Rackspace Cloud
Stars: ✭ 1,589 (+1171.2%)
Mutual labels:  laravel
Laravelgooglemaps
Laravel Google Maps Package
Stars: ✭ 124 (-0.8%)
Mutual labels:  laravel
Api Response
Simple and ready to use API response wrapper for Laravel.
Stars: ✭ 123 (-1.6%)
Mutual labels:  laravel
Larainvite
User (signup) invitation package for laravel
Stars: ✭ 123 (-1.6%)
Mutual labels:  laravel
Remove Bg
Programmatically remove backgrounds from your images using the remove.bg api
Stars: ✭ 124 (-0.8%)
Mutual labels:  laravel
Flysystem Qcloud Cos V5
💾 Flysystem Adapter for Tencent Cloud COS V5
Stars: ✭ 122 (-2.4%)
Mutual labels:  laravel
Laravel Uploader
🌴 An upload component for Laravel.
Stars: ✭ 125 (+0%)
Mutual labels:  laravel
Laravel Hackathon Starter
💻 A hackathon/MVP boilerplate for laravel web applications. Start your hackathons without hassle.
Stars: ✭ 1,589 (+1171.2%)
Mutual labels:  laravel
Laravel And Vue.js Spa Recipe Box
Single Page Application with Laravel 5.4 and Vue.js 2 - Recipe Box
Stars: ✭ 124 (-0.8%)
Mutual labels:  laravel
Onramp
Easing the onramp for new or non-PHP developers to become Laravel devs.
Stars: ✭ 123 (-1.6%)
Mutual labels:  laravel
Laravel Meta
Metadata for Eloquent model
Stars: ✭ 124 (-0.8%)
Mutual labels:  laravel
Coding
视频代码
Stars: ✭ 124 (-0.8%)
Mutual labels:  laravel
Laravel Mail Editor
MailEclipse ⚡ Laravel Mailable Editor!
Stars: ✭ 1,714 (+1271.2%)
Mutual labels:  laravel
Php Ddd Example
🐘🎯 Hexagonal Architecture + DDD + CQRS in PHP using Symfony 5
Stars: ✭ 1,960 (+1468%)
Mutual labels:  laravel
Roles Permissions Laravel
Roles and Permissions implementation on Laravel 5.4
Stars: ✭ 121 (-3.2%)
Mutual labels:  laravel
Roadrunner Laravel
[ABANDONED] Moved to https://github.com/spiral/roadrunner-laravel
Stars: ✭ 124 (-0.8%)
Mutual labels:  laravel
Report
Report management package in PHP that aims to help you export information in a variety of formats
Stars: ✭ 125 (+0%)
Mutual labels:  laravel
Docker Octobercms
Dockerized October CMS: PHP, Composer, October core and dependencies
Stars: ✭ 125 (+0%)
Mutual labels:  laravel
Laravel Nuxt
Build a SPA with Laravel and Nuxt.
Stars: ✭ 124 (-0.8%)
Mutual labels:  laravel

laravel-littlegatekeeper

Latest Version on Packagist Software License Build Status Quality Score Total Downloads

Protect pages from access with a universal username/password combination (set by configuration).

Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Postcardware

You're free to use this package (it's MIT-licensed), but if it makes it to your production environment you are required to send us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.

The best postcards will get published on the open source page on our website.

Install

You can install the package via Composer:

$ composer require spatie/laravel-littlegatekeeper

Start by registering the package's the service provider:

// config/app.php (L5)

'providers' => [
  // ...
  'Spatie\LittleGateKeeper\LittleGateKeeperServiceProvider',
],

Next, publish the config files:

$ php artisan vendor:publish --provider="Spatie\LittleGateKeeper\LittleGateKeeperServiceProvider" --tag="config"

Finally, register the middleware:

// app/Http/Kernel.php

protected $routeMiddleware = [
    // ...
    'littlegatekeeper' => \Spatie\LittleGateKeeper\AuthMiddleware::class,
];

Usage

First set up the username and password in your configuration file or .env file

In your .env file add:

// ...
GATEKEEPER_USERNAME=Choose_your_username
GATEKEEPER_PASSWORD=Choose_your_secret_password

You can protect your routes by applying the middleware:

Route::get('/', ['middleware' => 'littlegatekeeper', function () {
    return view('protectedpage');
}]);

If a user isn't logged in, he will be redirected to the url set in the config file (littlegatekeeper.authRoute).

Authenticator methods

/**
 * @param  array $credentials  Format: ['username' => '...', 'password' => '...']
 * @return bool
 */
public function attempt($credentials)
/**
 * @return bool
 */
public function isAuthenticated()
protected function logout()

Change log

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

About Spatie

Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.

License

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

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].