Installation Guide

Follow this step-by-step guide to install and set up ERP Mobile Bridge on your server.

System Requirements

Before installing ERP Mobile Bridge, ensure your server meets the following requirements:

Server Requirements
  • PHP: 8.1 or higher
  • Database: MySQL 5.7+ or MariaDB 10.3+
  • Web Server: Apache or Nginx
  • Composer: Latest version
  • Node.js & NPM: (Optional, for asset compilation)
PHP Extensions Required
  • BCMath
  • Ctype
  • Fileinfo
  • JSON
  • Mbstring
  • OpenSSL
  • PDO
  • Tokenizer
  • XML
  • cURL

Installation Steps

1Download the Project

Download the project files to your server and extract them:

cd webto-app

2Install Dependencies

Install PHP dependencies using Composer:

composer install
Note: If you encounter memory issues, try: composer install --no-dev --optimize-autoloader

3Environment Configuration

Copy the example environment file and configure it:

cp .env.example .env

Edit the .env file with your settings:

APP_NAME="ERP Mobile Bridge"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://yourdomain.com

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=webto_app
DB_USERNAME=your_username
DB_PASSWORD=your_password

4Generate Application Key

Generate a unique application key:

php artisan key:generate

Database Setup

5Create Database

Create a new MySQL database for the application:

mysql -u root -p
CREATE DATABASE webto_app CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
EXIT;

6Run Migrations

Run database migrations to create all necessary tables:

php artisan migrate

7Seed Database (Optional)

Optionally, seed the database with sample data:

php artisan db:seed

Storage Setup

8Create Storage Link

Create a symbolic link from public/storage to storage/app/public:

php artisan storage:link

9Set Permissions

Set proper permissions for storage and cache directories:

chmod -R 775 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache
Important: Replace www-data with your web server user (e.g., nginx, apache)

Create Admin Account

10Create First Admin User

Create an admin account using Laravel Tinker:

php artisan tinker

Then run the following commands in Tinker:

$user = new App\Models\User();
$user->name = 'Admin';
$user->email = 'admin@example.com';
$user->password = bcrypt('password123');
$user->save();
Security: Change the password immediately after first login!

Verification

11Test the Installation

Start the development server to test your installation:

php artisan serve

Visit http://localhost:8000 in your browser. You should see the login page.

12Login to Admin Panel

Navigate to the login page and use the credentials you created:

  • Email: admin@example.com
  • Password: password123
Success! If you can log in, your installation is complete. Proceed to Configuration Guide.

Troubleshooting

Common Issues

Solution:

  • Check storage and cache permissions
  • Ensure .env file exists and is configured
  • Run php artisan config:clear
  • Check error logs in storage/logs/laravel.log

Solution:

  • Verify database credentials in .env
  • Ensure MySQL/MariaDB is running
  • Check if database exists
  • Test connection: php artisan migrate:status

Solution:

  • Delete existing link: rm public/storage
  • Recreate link: php artisan storage:link
  • On Windows, run command prompt as Administrator
  • Check if symlinks are enabled on your server

Solution:

  • Update Composer: composer self-update
  • Clear cache: composer clear-cache
  • Increase memory limit: php -d memory_limit=-1 /path/to/composer install
  • Check PHP version compatibility
Useful Commands
Command Description
php artisan config:clear Clear configuration cache
php artisan cache:clear Clear application cache
php artisan route:clear Clear route cache
php artisan view:clear Clear compiled views
php artisan optimize:clear Clear all caches