Appearance
Database setup
ExchangePro uses Laravel migrations. All tables are created with:
bash
php artisan migrateSupported databases
| Driver | Use case |
|---|---|
| mysql | Production (recommended) |
| mariadb | Production |
| sqlite | Local development / quick demo |
MySQL / MariaDB
1. Create database
sql
CREATE DATABASE exchangepro CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'exchangepro'@'localhost' IDENTIFIED BY 'strong_password_here';
GRANT ALL PRIVILEGES ON exchangepro.* TO 'exchangepro'@'localhost';
FLUSH PRIVILEGES;2. Configure .env
ini
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=exchangepro
DB_USERNAME=exchangepro
DB_PASSWORD=strong_password_here3. Migrate
bash
php artisan migrateMain tables (reference)
| Table | Purpose |
|---|---|
users | Customers and administrators (role: user | admin) |
settings | Key-value JSON blobs (general, SEO, home page, etc.) |
currencies | Exchange currencies and rates |
currency_prices | External/synced reference rates |
currency_form_fields | Dynamic proof form schema |
transactions | Exchange orders |
blogs, blog_categories | Blog CMS |
legal_pages | Policy pages |
support_tickets, support_ticket_replies, attachments | Support system |
contact_submissions | Contact form |
subscribers | Newsletter emails |
ip_blocks | IP deny rules |
report_feature_submissions | Feedback |
app_notifications | In-app notifications |
sessions, cache, jobs | Laravel infrastructure |
Home page default content is seeded via migration 2026_05_31_000002_seed_home_page_settings.php.
Seed data
Home page settings are seeded via migration 2026_05_31_000002_seed_home_page_settings.php.
For automated tests, use UserFactory (database/factories/UserFactory.php).
First administrator
ExchangePro does not create a default admin user in the database. After migrations and frontend install, open {FRONTEND_URL}/signup and register your account.
While no admin user exists, the first account created is automatically assigned role = admin. Every later signup receives role = user unless changed in the admin panel.
Register before going public
Anyone who completes /signup first on a publicly reachable site becomes administrator. Register yourself before sharing the URL. See First admin account.
Reset database (development)
bash
php artisan migrate:freshThis deletes all data. Never run on production without backup.
Backup
Production backup example:
bash
mysqldump -u exchangepro -p exchangepro > backup-$(date +%F).sqlSchedule daily backups on your host.
Troubleshooting
| Error | Fix |
|---|---|
Access denied for user | Check DB credentials in .env |
Base table or view not found | Run php artisan migrate |
Specified key was too long | Use utf8mb4; MySQL 5.7+ or MariaDB 10.3+ |