{"id":16078447,"url":"https://github.com/romanzipp/laravel-blockade","last_synced_at":"2025-10-09T11:09:05.448Z","repository":{"id":40448027,"uuid":"299820955","full_name":"romanzipp/Laravel-Blockade","owner":"romanzipp","description":"⛔ Maintenance \u0026 WIP Page for Laravel. Simple but highly customizable.","archived":false,"fork":false,"pushed_at":"2025-03-19T05:32:35.000Z","size":430,"stargazers_count":13,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T11:09:04.672Z","etag":null,"topics":["development","laravel","password","php","php7","showcase","under-construction"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/romanzipp/laravel-blockade","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romanzipp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"romanzipp"}},"created_at":"2020-09-30T05:49:11.000Z","updated_at":"2025-03-25T13:37:06.000Z","dependencies_parsed_at":"2024-10-27T15:55:44.421Z","dependency_job_id":"41c70c8d-c9be-4ade-9c20-ed0056892eff","html_url":"https://github.com/romanzipp/Laravel-Blockade","commit_stats":{"total_commits":116,"total_committers":2,"mean_commits":58.0,"dds":0.0431034482758621,"last_synced_commit":"fbc628a3532d3313c0393a44ff2f357f62a9176f"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/romanzipp/Laravel-Blockade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanzipp%2FLaravel-Blockade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanzipp%2FLaravel-Blockade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanzipp%2FLaravel-Blockade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanzipp%2FLaravel-Blockade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romanzipp","download_url":"https://codeload.github.com/romanzipp/Laravel-Blockade/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanzipp%2FLaravel-Blockade/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001286,"owners_count":26083058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["development","laravel","password","php","php7","showcase","under-construction"],"created_at":"2024-10-09T10:12:53.498Z","updated_at":"2025-10-09T11:09:05.434Z","avatar_url":"https://github.com/romanzipp.png","language":"PHP","funding_links":["https://github.com/sponsors/romanzipp"],"categories":[],"sub_categories":[],"readme":"# Laravel Blockade\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/romanzipp/Laravel-Blockade.svg?style=flat-square)](https://packagist.org/packages/romanzipp/laravel-blockade)\n[![Total Downloads](https://img.shields.io/packagist/dt/romanzipp/Laravel-Blockade.svg?style=flat-square)](https://packagist.org/packages/romanzipp/laravel-blockade)\n[![License](https://img.shields.io/packagist/l/romanzipp/Laravel-Blockade.svg?style=flat-square)](https://packagist.org/packages/romanzipp/laravel-blockade)\n[![GitHub Build Status](https://img.shields.io/github/actions/workflow/status/romanzipp/Laravel-Blockade/tests.yml?branch=master\u0026label=tests\u0026style=flat-square)](https://github.com/romanzipp/Laravel-Blockade/actions)\n\nA simple but highly customizable package for preventing access to private or WIP Laravel projects.\n\n![](https://raw.githubusercontent.com/romanzipp/Laravel-Blockade/master/preview.png)\n\n## Features\n\n- Convenient access control for private projects or pages\n- Simple, beautiful and fully customizable error page\n- Replaceable authentication process \u0026 token storage\n\n#### Why just not use the Laravel Maintenance Mode?\n\nBlockade offers a simple way to share access to development or staging environments only by typing in a password. The authenticating user will return the intended URL after a successful login. The built in [Laravel Maintenance Mode](https://laravel.com/docs/8.x/configuration#maintenance-mode) uses a different approach by denying access in deployment or maintenance procedures.\n\n#### Do we need yet another access control package?\n\nYes! From my experience, other maintenance mode packages (and similar) only rely on one authentication method which is either cookie or session based. When working on many projects with different tech stacks, some drivers like session storage in API-only projects are simply not available.\nBlockade is meant to solve this issue by combining several auth mechanisms in one package.\n\n## Installation\n\n```\ncomposer require romanzipp/laravel-blockade\n```\n\n## Configuration\n\nCopy configuration \u0026 assets files to project folder:\n\n```\nphp artisan blockade:install\n```\n\nYou can also publish views (`--views`) and language files (`--lang`) to further customize the Blockade template.\n\nMake use of the [`--update`](#assets) parameter if you are seeing an error message at the bottom.\n\n## Usage\n\nTo enable Blockade, simply\n\n1. Set the environment variables `BLOCKADE_ENABLED=true` \u0026 `BLOCKADE_PASSWORD=`\n2. Register the [`BlockadeMiddleware`](./src/Http/Middleware/BlockadeMiddleware.php) class in your middleware stack.\n\n```php\nnamespace App\\Http;\n\nuse Illuminate\\Foundation\\Http\\Kernel as HttpKernel;\nuse romanzipp\\Blockade\\Http\\Middleware\\BlockadeMiddleware;\n\nclass Kernel extends HttpKernel\n{\n    // Globally for all routes\n\n    protected $middleware = [\n        // ...\n        BlockadeMiddleware::class,\n    ];\n\n    // In a single middleware group\n\n    protected $middlewareGroups = [\n        'web' =\u003e [\n            // ...\n            BlockadeMiddleware::class,\n        ]\n    ];\n\n    // As named middleware, applied in your routes file\n\n    protected $routeMiddleware = [\n        // ...\n        'blockade' =\u003e BlockadeMiddleware::class,\n    ];\n}\n```\n\nThe package defaults to the provided view for **password prompt** and stores the authentication hash in a **cookie**.\n\nTo reset previous granted access, just change the `BLOCKADE_PASSWORD` entry. All issued access tokens will be invalid on the next page request.\n\n### Handlers\n\nHandlers are responsible for validating authentication requests and sending successful or failed responses. You can set the active handler in [`blockade.handler`](./config/blockade.php#L28) and customize each handler individually via the [`blockade.handlers.*`](./config/blockade.php#L65) config entries.\n\n| Handler | Description | Class |\n| --- | --- | --- |\n| **Form** (default) | The password is provided by a form | [romanzipp\\Blockade\\Handlers\\FormHandler](./src/Handlers/FormHandler.php) |\n| Query Parameter | The password is attached as query parameter | [romanzipp\\Blockade\\Handlers\\QueryParameterHandler](./src/Handlers/QueryParameterHandler.php) | \n\n### Stores\n\nStores are storing (how surprising) the authentication state for later requests. You can set the active store in [`blockade.store`](./config/blockade.php#L37) and customize each store individually via the [`blockade.stores.*`](./config/blockade.php#L80) config entries.\n\n| Store | Description | Class |\n| --- | --- | --- |\n| **Cookies** (default) | The password hash will be stored as browser cookie | [romanzipp\\Blockade\\Stores\\CookieStore](./src/Stores/CookieStore.php) |\n| Session | The password hash will be stored in the active session | [romanzipp\\Blockade\\Stores\\SessionStore](./src/Stores/SessionStore.php) | \n\n**Important**: If you are using the `SessionStore` make sure the `BlockadeMiddleware` is appended **after** the `Illuminate\\Session\\Middleware\\StartSession` middleware.\n\n## Extending\n\nYou can create your own authentication process by simply implementing the\n - [`romanzipp\\Blockade\\Handlers\\Contracts\\HandlerContract`](./src/Handlers/Contracts/HandlerContract.php) interface for handlers and\n - [`romanzipp\\Blockade\\Stores\\Contracts\\StoreContract`](./src/Stores/Contracts/StoreContract.php) interface for stores.\n \n## Assets\n\nIt is recommended to publish the provided css files via the [`vendor:publish`](#configuration) command listed at the top. If the bundled asset file is not available we will use a fallback from [unkpg.com](https://unpkg.com) and display an error notice in the footer section.\n\nUse the `--update` argument to update the published assets.\n\n```\nphp artisan blockade:install --update\n```\n\n## Disclamer\n\n#### This is no cryptographically secure authentication\n\nThe package stores the authentication token as SHA 256 hash of the configured password.\n\n## Testing\n\n```\n./vendor/bin/phpunit\n```\n\n## Build Frontend\n\n### Development\n\n```\nyarn dev\n```\n\n### Production\n\n```\nyarn prod\n```\n\n## Credits\n\nSpecial thanks to [Katerina Limpitsouni](https://twitter.com/ninaLimpi) for the awesome [unDraw](https://undraw.co) SVG illustrations!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromanzipp%2Flaravel-blockade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromanzipp%2Flaravel-blockade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromanzipp%2Flaravel-blockade/lists"}