Step 1 โ Create the base Laravel 12 project
StayForge ships as a set of application files meant to sit on top of a fresh Laravel 12 install, so the first step is generating that base project and its dependencies:
cd stayforge
# Core packages StayForge relies on
composer require laravel/sanctum intervention/image
composer require stripe/stripe-php srmklive/paypal razorpay/razorpay
composer require openai-php/client mcamara/laravel-localization
Step 2 โ Copy in the StayForge application files
Copy the following folders from the StayForge package on top of your fresh project, merging rather than overwriting your Laravel skeleton:
| Folder | Action |
|---|---|
app/ | Merge โ adds Models, Http/Controllers, Services, Mail, Notifications, Providers |
database/migrations/ | Merge โ adds all StayForge tables alongside Laravel's defaults |
database/seeders/ | Replace โ demo data and default settings |
routes/web.php | Replace |
resources/views/ | Merge โ guest site, admin panel, email templates |
public/uploads/ | Copy as-is โ destination for every upload |
Step 3 โ Three small config merges
Three snippet files are included for changes that must go inside existing Laravel config files rather than replace them:
config/filesystems.php
Add the uploads disk from config/filesystems.snippet.php to the disks array. This points all uploads at public/uploads without needing a symlink.
config/services.php
Add the openai, anthropic, stripe, paypal, and razorpay blocks from config/services.snippet.php. These are just .env-backed fallback defaults โ live values set in Admin Settings always take priority.
bootstrap/providers.php
Register App\Providers\DynamicSettingsServiceProvider from bootstrap-providers.snippet.php โ this is what applies Admin-configured email settings at runtime.
Step 4 โ Authentication scaffolding
StayForge's routes expect standard login, register, and logout routes at routes/auth.php. The fastest way to get these with matching Blade views is Laravel Breeze:
php artisan breeze:install blade
Breeze's generated auth views work as-is โ every other page in the app uses StayForge's own resources/views/layouts/app.blade.php layout.
Step 5 โ Environment & database
php artisan key:generate
# Edit .env: DB_DATABASE, DB_USERNAME, DB_PASSWORD
# FILESYSTEM_DISK=uploads is already set for you
php artisan migrate
php artisan db:seed
The seeder creates an admin login (admin@example.com / password โ change this immediately), 20 common amenities, 5 languages, 4 currencies, and sensible default settings: AI enabled with OpenAI as default provider, Manual/Pay-at-Hotel payments enabled, and email set to the safe log driver until you configure SMTP.
Step 6 โ Uploads folder permissions
Every hotel photo, room photo, and avatar is written here by App\Services\UploadService. No storage:link is required โ this works even on hosts that disallow symlinks.
Step 7 โ Run it
Visit / for the guest-facing site, and /admin after logging in with the seeded admin account.
First login checklist
- Change the seeded admin password immediately.
- Create your first hotel under Admin โ Hotels โ Add Hotel, then add at least one room.
- Decide which payment gateways you'll offer (see below) and enter their credentials.
- Point Email Settings at your real SMTP provider and send a test email.
Enabling AI
Go to Admin โ Settings โ AI. AI ships fully enabled by default, but with no API keys โ every feature will silently no-op until you add at least one key:
- Paste your OpenAI key and/or Anthropic key into the respective fields.
- Pick a default provider โ this is used by any feature without its own override.
- Optionally override the provider per feature (e.g. Claude for chat, OpenAI for descriptions).
- Toggle off any individual feature you don't want active.
Enabling payments
Go to Admin โ Settings โ Payments. Manual/Pay-at-Hotel is on by default and needs no credentials. For online gateways:
- Stripe โ publishable key, secret key, and webhook secret from your Stripe Dashboard.
- PayPal โ client ID and secret from a PayPal REST app; choose Sandbox while testing.
- Razorpay โ key ID and key secret from your Razorpay Dashboard.
Any combination can be active simultaneously โ guests choose at checkout from whatever you've enabled.
Configuring email
Go to Admin โ Settings โ Email. Set your SMTP host, port, username, password and encryption, plus a from-address and from-name, then use the Send Test Email button to confirm delivery before going live. Until configured, the mailer defaults to log, meaning emails are written to the Laravel log instead of sent โ safe for local development.
Troubleshooting
uploads disk was added to config/filesystems.php and that FILESYSTEM_DISK=uploads is set in .env, then check public/uploads is writable.log, and use the Send Test Email button to see the exact error message returned by your SMTP provider.