Configure ERP Mobile Bridge to match your requirements and integrate with Firebase for push notifications.
Edit your .env file to configure basic application settings:
# Application
APP_NAME="Your App Name"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://yourdomain.com
# Database
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database
DB_USERNAME=your_username
DB_PASSWORD=your_password
# Mail (Optional)
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="noreply@yourdomain.com"
MAIL_FROM_NAME="${APP_NAME}"
APP_DEBUG=false in production to prevent sensitive
information leakage.
Firebase is required for push notifications. Follow these steps to configure Firebase:
Place the Firebase service account JSON file in your project:
storage/app/firebase/firebase-credentials.json
Update your .env file:
FIREBASE_CREDENTIALS=firebase/firebase-credentials.json
storage/app/firebase/ directory exists and has
proper permissions.
You can test the Firebase connection by sending a test notification from the admin panel.
Configure your app settings through the admin panel at /app-settings:
| Field | Description | Example |
|---|---|---|
| App Name | Your application name | My Awesome App |
| Package Name | Android/iOS package identifier | com.example.myapp |
| Platform | Target platform(s) | Both, Android, or iOS |
| Website URL | Your website to load in the app | https://example.com |
Upload your app logos through the App Settings page:
Recommended Size: 512x512px
Format: PNG with transparency
Usage: App icon, admin panel branding
This logo appears in the admin sidebar, login page, and is served to mobile apps.
Recommended Size: 1080x1920px
Format: PNG with transparency
Usage: App splash screen
This logo appears when the mobile app launches.
storage/app/public/logos/ and accessible
via /storage/logos/
Customize your app's color scheme to match your brand:
Main brand color used for headers, buttons, and accents.
Default: #2196f3
Secondary brand color for highlights and CTAs.
Default: #ffc107
Enable or disable app features through the App Settings page:
| Feature | Description | Default |
|---|---|---|
| Pull to Refresh | Allow users to refresh content by pulling down | Enabled |
| Exit Popup | Show confirmation dialog when user tries to exit | Enabled |
| Hide Header | Hide the app header/toolbar | Disabled |
| Hide Footer | Hide the app footer/navigation | Disabled |
| Maintenance Mode | Show maintenance message to app users | Disabled |
Share Message: Customize the message shown when users share your app.
Example: "Check out this amazing app!"
Offline Message: Message displayed when device is offline.
Example: "No internet connection. Please check your network settings."
Before deploying to production, run these optimization commands:
# Cache configuration
php artisan config:cache
# Cache routes
php artisan route:cache
# Cache views
php artisan view:cache
# Optimize autoloader
composer install --optimize-autoloader --no-dev
APP_DEBUG=false
.env file
secure and outside web rootEnsure mod_rewrite is enabled. The .htaccess file should already be in
the public directory.
Add this configuration to your Nginx server block:
server {
listen 80;
server_name yourdomain.com;
root /path/to/web2app-pro/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
Use Let's Encrypt for free SSL certificates:
# Install Certbot
sudo apt install certbot python3-certbot-nginx
# Get certificate
sudo certbot --nginx -d yourdomain.com
# Auto-renewal is configured automatically