dnwjn / nova-launch
A Laravel Nova tool for the pre-launch and launch phases of your website.
Requires
- php: ^7.2.5|^8.0
- bensampo/laravel-enum: ^2.0|^3.0
- illuminate/auth: ^5.8|^6.0|^7.0|^8.0
- illuminate/container: ^5.8|^6.0|^7.0|^8.0
- illuminate/contracts: ^5.8|^6.0|^7.0|^8.0
- illuminate/database: ^5.8|^6.0|^7.0|^8.0
- illuminate/events: ^5.8|^6.0|^7.0|^8.0
- laravel/framework: ^5.8|^6.0|^7.0|^8.0
- laravel/nova: ^2.0|^3.0
- optimistdigital/nova-translations-loader: ^2.0|^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0
- orchestra/testbench: ^5.0|6.0
- phpunit/phpunit: ^8.0|^9.0
This package is auto-updated.
Last update: 2024-11-14 22:39:00 UTC
README
nova-launch is a Laravel Nova tool for the pre-launch and launch phases of your website. It redirects visitors, allows bypasses and launches your website whenever you say the word.
ℹ️ Introduction
I was working on a project with a friend when I took on the task of implementing functionality for disabling the website for visitors, while still allowing admins to access it. Furthermore, the site had to be launchable from within Nova.
Well, I created that functionality and kept refining it until I thought: maybe I should extract this from the project and wrap it in its own package?
So, I give you: nova-launch. It does the following:
- Disable the website for visitors by redirecting them to a single page (which is completely configurable by the developer). By default this page shows some basic information and a sign up form (table, model and store functionality are also included by default, because to me this seemed to be the most interesting functionality).
- Allow admins or people that know the secret (if enabled) full access to the website.
- Launch the website via Nova or the
php artisan nova-launch:launch
command. - Dispatch an event after launch, because you might want to do more after that!
- Completely disable itself after launch to lower the impact from multiple checks on each request.
This is my very first package, so suggestions and tips for me to improve this or future packages are welcome!
🖥 Requirements
🚀 Installation
-
Install the package via Composer:
composer require dnwjn/nova-launch
The service provider will automatically be registered.
-
Publish the resources:
php artisan vendor:publish --provider="Dnwjn\NovaLaunch\NovaLaunchServiceProvider" --tag="minimal"
The
minimal
tag only publishes the elements required by the package to work. See the table below for an overview of what can be published. -
Run the migrations:
php artisan migrate
-
Edit the configuration file
config/nova-launch.php
to your likings. The most important parts here are:- the
routes
configuration; - the
models.user
configuration.
- the
📢 Publishing
The following tags can be used during publishing. This is done in the same way as in step 1 of the installation process:
php artisan vendor:publish --provider="Dnwjn\NovaLaunch\NovaLaunchServiceProvider" --tag="<tag>"
🛠 Testing
You can run tests with the following command:
composer run test
Note: tests are now very basic but more will be added in the future.
🔄 Changelog
Please see CHANGELOG.md for information on what has changed.
📜 License
This package uses the MIT License (MIT). Please see LICENSE.md for more information.