@phillipsharring/handlr-module-landing
v0.2.0
Published
Landing page module for handlr/graspr apps -- email capture and coming-soon page
Maintainers
Readme
handlr-module-landing

Landing page module for handlr/graspr apps. Provides a "coming soon" email capture page and admin list.
Install
composer require phillipsharring/handlr-module-landingOne package. Composer installs both the PHP backend (service provider, handlers, migration) and the frontend assets (pages, components, JS module definition).
Setup
Two lines to connect:
1. Register the service provider in backend/app/config.php:
'providers' => [
// ...
Handlr\Module\Landing\LandingServiceProvider::class,
],2. Register the frontend module in frontend/site.config.js:
import { landing } from '../backend/vendor/phillipsharring/handlr-module-landing/src/index.js';
export default {
// ...
modules: [landing],
};3. Run the migration to create the email_captures table:
composer run migrateWhat's included
Backend
POST /api/public/email-capture-- captures an email address (public, no auth required)GET /api/admin/email-captures-- lists all captured emails (admin only)email_capturestable migration (auto-discovered viamigrationPaths())
Frontend
/landing/page with email capture form- Module object with self-resolving
pagesDirandcomponentsDirfor graspr-build
Configuration
Override defaults with configure() from @phillipsharring/graspr-build:
import { configure } from '@phillipsharring/graspr-build/modules';
import { landing } from '../backend/vendor/phillipsharring/handlr-module-landing/src/index.js';
export default {
modules: [
configure(landing, { adminNav: false }),
],
};Removal
- Remove
LandingServiceProvider::classfromconfig.php - Remove the
landingimport and entry fromsite.config.js composer remove phillipsharring/handlr-module-landing- Roll back the migration (or drop the
email_capturestable)
Requires
phillipsharring/handlr-framework>= 0.5@phillipsharring/graspr-build>= 0.3.0 (for module support in the build system)
