FleetHub Documentation

Frequently asked questions

Can I run FleetHub on the cheapest Hostinger Single plan?

Yes — FleetHub is fully compatible with Hostinger Single (~$2.99/month). Single includes PHP 8.3, MySQL, native Cron Jobs, and free SSL — everything FleetHub needs. No SSH, no Composer, no command line required. See the Hostinger Setup section for the step-by-step guide.

Do I need technical skills to install it?

No. The web-based installer handles everything: requirements check, database setup, migrations, and admin account creation. Just upload the files, visit /install in your browser, and follow the wizard.

How do scheduled emails (compliance/maintenance alerts) work?

FleetHub uses Laravel's scheduler. You only configure one cron job that runs every minute, and Laravel internally dispatches each task at its correct time (daily 08:00, monthly, etc.). For cPanel, set it up in Advanced → Cron Jobs. For Hostinger, use hPanel → Advanced → Cron Jobs. See cPanel Setup → Step 7 or Hostinger Setup → Step 5. If your host has no cron, use the in-app Cron URL with the free cron-job.org service.

What depreciation methods are supported?

Three methods: Straight Line, Declining Balance, and Units of Production (based on odometer km). Vehicle values feed the TCO dashboard and are auto-refreshed monthly.

Does the QR scanner work on mobile phones?

Yes — drivers and managers can scan vehicle QR codes with the browser camera via html5-qrcode. Quick-scan actions (fuel log, odometer, incident report) require login. The only requirement is HTTPS.

Can I add my own fields without coding?

Yes. Admin → Custom Fields lets you add unlimited attributes (text, number, date, select, textarea, file, checkbox), scope them to vehicle categories, mark them required, and reorder via drag-and-drop.

How many languages does FleetHub support?

11 locales out of the box: English, Vietnamese, Spanish, French, German, Chinese, Japanese, Portuguese (BR), Russian, Arabic (with full RTL support), and Hindi. Admins manage translations from Administration → Translations.

Can I install FleetHub on cPanel shared hosting?

Yes — FleetHub works on any standard cPanel shared hosting plan with PHP 8.2+, MySQL, and Cron Jobs. No Composer or Node.js on the server is required — the package ships pre-built. See the cPanel Setup section.

How do I rebrand FleetHub (login page, page title & colors)?

FleetHub can be fully rebranded from the admin panel — no code edits or npm run build required. The login logo, footer, badge, and browser page title follow Settings → Branding → App Name. The Appearance tab lets you customize app-wide colors for light and dark mode.

Full rebrand checklist: update App Name (logo, login, page title) → edit auth.login_subtitle per language → customize colors in Settings → Appearance.

Quick reference:

WhatExampleHow to change
Top-left logo & wordmarkYour Fleet AppSettings → Branding → App Name
Login subtitleEnter your credentials to access FleetHubAdministration → Translationsauth.login_subtitle
Footer copyright© 2026 Your CompanySettings → Branding → App Name
Browser page title (tab)YourAppNameSettings → Branding → App Name
App colorsCustom paletteSettings → Appearance

1. Logo and wordmark: Sign in as admin → Settings → Branding → update App Name (and optionally upload a logo) → Save.

2. Login subtitle: Edit auth.login_subtitle in Administration → Translations for each language, or edit lang/{locale}/auth.php directly.

3. App colors: Settings → Appearance — configure brand, accent, status, and text colors separately for light and dark mode. Click Save appearance to apply app-wide.

Overview

FleetHub is an enterprise fleet asset management system for internal company vehicles (50–200 vehicles). Built with Laravel 11, Vue 3, and Tailwind CSS — it covers vehicles, drivers, requisitions, handovers with damage mapping, fuel logs, expenses, TCO analytics, compliance tracking, and fleet health scoring. Not designed for taxi or car-rental businesses.

QR Quick-Scan

Scan any vehicle QR to log fuel, update odometer, or report incidents — mobile-first for drivers.

TCO Dashboard

Total cost of ownership per vehicle and fleet-wide — purchase, fuel, maintenance, insurance, and more.

Vehicle Handover

Outgoing/incoming handovers with 2D damage mapper, checklist, photos, signature, and PDF report.

Fleet Health Score

Daily score with breakdown — overdue maintenance, expiring compliance, fuel anomalies.

Compliance Tracking

Insurance, registration, road tax, permits, driver licenses — alerts at 30/14/7/1 days.

Fleet Reports

7 built-in reports with charts, Excel and PDF export.

Server Requirements

  • PHP 8.2 or higher (8.3 recommended)
  • MySQL 5.7+ or MariaDB 10.3+
  • Composer 2.x (for local development only — not required on shared hosting)
  • Node.js 18+ and npm 9+ (for local frontend builds only)
  • Web server: Apache or Nginx

Required PHP Extensions

  • OpenSSL, PDO, PDO_MySQL, Mbstring, Tokenizer, XML, Ctype, JSON, GD, Fileinfo

Disk space

~ 200 MB minimum. Allow extra space for vehicle photos, fuel receipts, handover images, and compliance documents.

Installation

Option A — Web Installer (Recommended)

  1. Upload the project files to your web server.
  2. Point your domain document root to public/.
  3. Set permissions: storage/ and bootstrap/cache/ must be writable (chmod 775).
  4. Copy .env.example to .env and set APP_KEY (run php artisan key:generate if you have SSH/Terminal, or see cPanel Setup → Step 5).
  5. Visit https://yourdomain.com/install in your browser.
  6. Follow the wizard — Requirements → Database → Migrate → Admin Account → Done. Check Include demo data to load sample fleet with demo accounts (see Users & Roles).

Option B — CLI Installation

# 1. Install dependencies
composer install --no-dev --optimize-autoloader
npm install
npm run build

# 2. Configure environment
cp .env.example .env
php artisan key:generate

# 3. Edit .env to set DB credentials
# DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD

# 4. Create database tables and seed initial data
php artisan migrate --seed

# 5. Create storage symlink for uploads
php artisan storage:link

# 6. Cache config for production
php artisan config:cache
php artisan route:cache
php artisan view:cache

# 7. Mark as installed
echo "Installed" > storage/installed.lock
Web server configuration: Document root must point to the public/ directory. For Apache, the included .htaccess handles URL rewriting. For Nginx, see the Laravel deployment guide.

Wizard Step 2 — Database Configuration

When the wizard reaches Step 2, enter the MySQL connection details for the database you created in your hosting panel.

FieldDefault / ExampleNotes
Host127.0.0.1Works on 99% of shared hosts. Keep this default unless your hosting provides a custom MySQL hostname.
Port3306Standard MySQL port. Only change if your provider uses a non-standard port.
Database nameuXXXXXX_fleethubThe full name shown in your hosting panel, including any prefix.
UsernameuXXXXXX_fleethubMySQL user with permissions on the database above. Do not use root on shared hosting.
Password(your DB password)The password you set when creating the MySQL user.

Where to find these credentials by hosting panel

  • Hostinger: hPanel → Databases → Management → click your database.
  • cPanel: cPanel → MySQL Databases. The database list shows names; users are listed below.
  • Plesk: Plesk → Databases → click the database name.
  • DirectAdmin: DirectAdmin → MySQL Management → click the database.
  • External / managed DB: AWS RDS, DigitalOcean Managed Database, etc. Use credentials from your cloud console.

Common errors and how to fix them

Error messageCause and fix
SQLSTATE[HY000] [1045] Access deniedWrong username or password, or the user doesn't have access to this database.
SQLSTATE[HY000] [1049] Unknown databaseThe database name is wrong, or you haven't created the database yet.
SQLSTATE[HY000] [2002] Connection refusedThe MySQL server can't be reached. Try localhost instead of 127.0.0.1 or vice versa.
SQLSTATE[42S02] Base table not found: sessionsSet SESSION_DRIVER=file and CACHE_STORE=file in .env before migration.
could not find driverPHP pdo_mysql extension is missing. Enable it in your hosting panel.
Tip: Host and Port are pre-filled with 127.0.0.1 and 3306 — leave them as-is on shared hosting.

Localhost (Local Development)

Quick guide to run FleetHub on your computer for testing or development before deploying to production. Pick the environment that matches your operating system.

Recommended: Laravel Herd is the fastest path on macOS and Windows — no Docker, no manual Apache/MySQL configuration. XAMPP and Laragon are good free alternatives if you prefer a traditional stack.

Option 1 — Laravel Herd (Recommended, macOS & Windows)

Laravel Herd is the official local environment from the Laravel team — free, native, no Docker. Bundles PHP 8.2/8.3/8.4, Nginx, and (in Herd Pro) MySQL/Redis.

  1. Download and install Laravel Herd from herd.laravel.com.
  2. Place the FleetHub project folder inside ~/Herd/ (macOS) or %USERPROFILE%\Herd\ (Windows). Herd auto-creates a .test domain — e.g. http://fleethub.test.
  3. Open Herd → Sites and confirm PHP version is 8.2 or 8.3. Right-click the site → Secure to enable HTTPS (needed for QR scanner).
  4. Create a MySQL database. With Herd Pro, use Services → MySQL → Open in TablePlus. Otherwise install MySQL Community or use SQLite (DB_CONNECTION=sqlite, touch database/database.sqlite).
  5. Copy .env.example to .env, fill in DB credentials, then run php artisan key:generate from the project root.
  6. Open http://fleethub.test/install in your browser and follow the installer wizard.

Option 2 — XAMPP (Windows, macOS, Linux)

XAMPP bundles Apache, MySQL/MariaDB, and PHP. Free and cross-platform. Make sure to pick a version with PHP 8.2 or newer.

  1. Download XAMPP 8.2+ from apachefriends.org and install it.
  2. Copy the FleetHub project into C:\xampp\htdocs\FleetHub\ (Windows) or /Applications/XAMPP/htdocs/FleetHub/ (macOS).
  3. Open XAMPP Control Panel and start Apache and MySQL. If the ports are busy, use Config → service.conf to switch Apache to 8080.
  4. Go to http://localhost/phpmyadminNew → create a database named fleethub with utf8mb4 collation.
  5. In the project folder: copy .env.example to .env, set DB_DATABASE=fleethub, DB_USERNAME=root, leave DB_PASSWORD empty (XAMPP default). Run php artisan key:generate.
  6. Visit http://localhost/FleetHub/public/install to run the installer wizard.
Pretty URLs without /public/: create a virtual host in C:\xampp\apache\conf\extra\httpd-vhosts.conf pointing DocumentRoot to the project's public/ folder, then add 127.0.0.1 fleethub.local to your hosts file.

Option 3 — Laragon (Windows)

Laragon is a portable Windows stack designed for Laravel — auto vhosts, pretty URLs, MySQL/MariaDB, and bundled HeidiSQL.

  1. Download Laragon Full from laragon.org and install it.
  2. In Laragon: Menu → PHP → Version — switch to PHP 8.2 or 8.3.
  3. Copy the FleetHub project into C:\laragon\www\FleetHub\.
  4. Click Start All. Laragon auto-creates the vhost: http://fleethub.test (pointing to the public/ folder).
  5. Open HeidiSQL (bundled) → create a database fleethub. Default credentials: user root, password empty.
  6. Edit .env with the DB credentials, run php artisan key:generate, then visit http://fleethub.test/install.

Option 4 — Built-in PHP server (no web server needed)

The simplest option: Laravel ships with artisan serve, which starts a development PHP server. No Apache or Nginx required. Best for quick testing.

# Install dependencies and configure
cd /path/to/FleetHub
composer install
cp .env.example .env
php artisan key:generate

# Run migrations and seed initial data
php artisan migrate --seed

# Start the development server
php artisan serve
# Then visit: http://127.0.0.1:8000/install

Common localhost gotchas

QR scanner camera doesn't open on http://

Browser camera APIs require HTTPS, with one exception: http://localhost and http://127.0.0.1 are treated as secure contexts. If you access FleetHub via your LAN IP (e.g. http://192.168.1.10), the camera will refuse. Use localhost for dev, or enable HTTPS via Herd / mkcert.

Permission denied on storage (macOS / Linux)

If you see write errors when the app tries to log or cache, fix permissions: chmod -R 775 storage bootstrap/cache. On Windows this isn't usually needed.

Port already in use

If port 8000 is taken by another app, use a different port:

php artisan serve --port=8001

Testing emails locally

Real SMTP isn't available on most localhost setups. Two safe options: (1) set MAIL_MAILER=log in .env — emails are dumped to storage/logs/laravel.log instead of being sent; or (2) use Mailtrap / MailHog to capture outgoing mail in a fake inbox.

MAIL_MAILER=log
# All emails are written to storage/logs/laravel.log

Frontend assets (Vite / Tailwind)

FleetHub's Vue/Tailwind frontend is pre-built in the package. If you edit Vue components or Tailwind config you'll need Node.js 18+:

npm install
npm run dev    # Hot-reload during development
npm run build  # Production build (run before deploying)

Deploying to Hostinger Single (Shared Hosting)

This is the recommended path for users without VPS or technical experience. FleetHub is fully compatible with the cheapest Hostinger Single Web Hosting plan (~$2.99/month). No SSH, no Composer, no command line needed — Single includes native cron jobs, PHP 8.3, and free SSL out of the box.

Tested on: Hostinger Single, Premium, Business plans (PHP 8.2+, MySQL 5.7+, native Cron Jobs included on all tiers).

Step 1 — Prepare your hosting

  1. Login to Hostinger hPanel.
  2. Go to Hosting → Manage for your domain.
  3. Set PHP version to 8.2 or 8.3 via Advanced → PHP Configuration.
  4. Make sure these PHP extensions are enabled (usually default):
    • OpenSSL, PDO, PDO_MySQL, Mbstring, GD, Tokenizer, XML, Ctype, JSON, Fileinfo

Step 2 — Create MySQL database

  1. In hPanel, go to Databases → MySQL Databases.
  2. Click Create New Database.
  3. Note these 3 values:
    • Database name — e.g. u123_FleetHub
    • Username — e.g. u123_admin
    • Password — auto-generated, keep it safe

Step 3 — Upload files

  1. Go to Files → File Manager in hPanel.
  2. Navigate to public_html/ (this is your domain's root).
  3. Delete any default index.html or default.php in that folder.
  4. Click Upload Files and upload the entire source.zip from the package.
    Or upload the contents of /source/ folder directly via FTP if you prefer.
  5. If you uploaded a ZIP, right-click → Extract. After extraction, all files should be at the root of public_html/.
  6. Verify public_html/ contains: app/, public/, vendor/, .htaccess, index.php (in public/), .env, etc.
Important: Make sure the file .htaccess exists at the root of public_html/. It contains the URL rewriting rules. If File Manager hides hidden files, click Settings → Show hidden files.

Step 4 — Run the installer

  1. Open your browser and go to https://yourdomain.com/install.
  2. You'll see the FleetHub Installer.
  3. Step 1: Requirements — All checks should pass (green). If any fail, contact Hostinger support to enable the missing PHP extension.
  4. Step 2: Database — Enter the credentials from Step 2 above:
    • Host: localhost
    • Port: 3306
    • Database: u123_FleetHub
    • Username: u123_admin
    • Password: (the one Hostinger generated)
  5. Step 3: Migrate — Click "Run Migrations & Seed". Takes ~10 seconds. Don't refresh.
  6. Step 4: Admin — Create your administrator account. Use a strong password.
  7. Done! — You'll see the Cron URL (save this!) and a button to login.

Step 5 — Setup automatic email alerts via Hostinger Cron

FleetHub uses Laravel's scheduler for background tasks: compliance expiry alerts, maintenance reminders, requisition overdue notices, driver license alerts, vehicle value updates, and fleet health score recalculation. Set up one cron job in hPanel and Laravel decides which task to run when.

  1. In hPanel, go to Advanced → Cron Jobs.
  2. Click Create Cron job.
  3. Select type: Custom (not "PHP" — we need to pass an argument).
  4. For the command, enter (replace uXXXXXX with your Hostinger account username):
    /usr/bin/php /home/uXXXXXX/public_html/artisan schedule:run
    Tip: open File Manager, locate the artisan file (root of your project), right-click → Properties to copy the full path.
  5. Set schedule to Every minute — all five fields (Minute, Hour, Day, Month, Day of week) set to *.
  6. Click Save.

That's it — FleetHub now sends requisition overdue reminders, maintenance alerts, compliance and license expiry alerts, refreshes vehicle depreciation values, and recalculates the fleet health score automatically.

Document root set to public_html/public/? No problem — your Laravel code still lives at public_html/ root, so the cron path remains /home/uXXXX/public_html/artisan (don't add /public/).
Fallback for hosts without cron: If you're not on Hostinger or your provider lacks cron jobs, FleetHub also exposes a webhook trigger URL.
  1. Login as admin → Settings → System tab → copy your Cron URL.
  2. Sign up free at cron-job.org.
  3. Create a cronjob, paste the URL, set Every 15 minutes, save.

Step 6 — Configure email (SMTP)

Hostinger provides email accounts with each plan. To use them for FleetHub notifications:

  1. In hPanel, go to Emails → Email Accounts and create one (e.g. noreply@yourdomain.com).
  2. Edit the .env file in public_html/ via File Manager:
    MAIL_MAILER=smtp
    MAIL_HOST=smtp.hostinger.com
    MAIL_PORT=587
    MAIL_USERNAME=noreply@yourdomain.com
    MAIL_PASSWORD=your_email_password
    MAIL_ENCRYPTION=tls
    MAIL_FROM_ADDRESS=noreply@yourdomain.com
    MAIL_FROM_NAME="Your Company Name"
  3. Save the file.
  4. Login to FleetHub → Settings → Email tab → Send Test Email. If you receive it, you're done.
SMTP limits on Single: Hostinger Single allows ~100 outgoing emails per hour. For larger deployments, use a dedicated provider like SendGrid, Mailgun, or Postmark (free tiers available).

Common issues on Hostinger Single

"500 Internal Server Error" after upload

  • Verify .htaccess exists at public_html/ root and contains the rewrite rules.
  • Verify PHP version is set to 8.2 or 8.3 in hPanel.
  • Check storage/logs/laravel.log via File Manager for the actual error.

"Permission denied" on uploads

Hostinger usually sets correct permissions, but if not:

  • Right-click storage/ in File Manager → Permissions → set to 755 recursively.
  • Same for bootstrap/cache/.

QR code scanner camera doesn't open

Browser camera APIs require HTTPS. Hostinger provides free SSL via Let's Encrypt — enable it in hPanel under SSL → Manage.

Scheduled emails aren't being sent

  • In hPanel → Cron Jobs → check the Last run column on your cron entry. If empty, the cron isn't firing — verify the artisan path is correct.
  • Test the command manually: open Terminal in hPanel (if available) and run the cron command. If it errors, the error message will pinpoint the issue (wrong PHP version, wrong path, etc.).
  • Verify SMTP is correctly configured (Settings → Email → Send Test).
  • Check storage/logs/laravel.log for scheduler errors.

Slow performance

Hostinger Single has shared CPU/RAM. If your team is more than 20 users, consider:

  • Upgrading to Premium (~$3.99/month) — faster servers, more resources, multiple databases.
  • Or Business (~$5.99/month) — dedicated resources, daily backups, staging environment.

Deploying to cPanel (Shared Hosting)

This guide covers standard cPanel shared hosting (Namecheap, Bluehost, GoDaddy, and most budget hosts). FleetHub ships with vendor/ and pre-built frontend assets — no Composer, npm, or web Terminal required. If your cPanel lacks Terminal, use SSH Access or the File Manager workarounds below.

Tested on: cPanel 110+ with PHP 8.2/8.3, MySQL 5.7+/MariaDB 10.3+, Apache, and native Cron Jobs. Home directory is typically /home/CPANELUSER/ — check the sidebar in cPanel under General Information.

Step 1 — Set PHP version and extensions

  1. Login to cPanel.
  2. Open MultiPHP Manager (or Select PHP Version) and set your domain to PHP 8.2 or 8.3.
  3. Open MultiPHP INI Editor or PHP Extensions and confirm these are enabled:
    • OpenSSL, PDO, PDO_MySQL, Mbstring, GD, Tokenizer, XML, Ctype, JSON, Fileinfo
  4. If an extension is missing, enable it in the extensions list or contact your host's support.

Step 2 — Enable SSL (HTTPS)

  1. Go to SSL/TLS Status (or Let's Encrypt SSL / AutoSSL).
  2. Run AutoSSL or install a free certificate for your domain.
  3. HTTPS is required for the in-browser QR scanner to access the camera.
Tip: Wait a few minutes after enabling SSL, then visit https://yourdomain.com to confirm the padlock icon appears.

Step 3 — Create MySQL database and user

  1. Open Manage My Databases (under Databases).
  2. Under Create New Database, enter a name (e.g. fleethub) and click Create. cPanel adds your account prefix automatically — the full name will look like cpaneluser_fleethub.
  3. Under MySQL Users, create a user with a strong password. Copy the full prefixed username.
  4. Under Add User To Database, select the user and database, click Add, then grant ALL PRIVILEGES. This step is easy to miss — without it you get Access denied (1045) errors.
  5. Note these three values exactly as shown in cPanel:
    • Database name — e.g. u123_FleetHub
    • Username — e.g. u123_admin
    • Password — auto-generated, keep it safe

Step 4 — Upload files

  1. Open File Manager and go to public_html/ (your domain's document root).
  2. Enable Settings → Show Hidden Files so you can see .htaccess and .env.
  3. Delete any default index.html in public_html/ if present.
  4. Upload the package source.zip and Extract it, or upload the contents of the /source/ folder via FTP.
  5. After extraction, public_html/ should contain app/, public/, vendor/, root .htaccess, and artisan at the same level.
Important: The root .htaccess redirects all requests to the public/ folder — you do not need to change the document root manually on most hosts.

Step 5 — Prepare .env before running the installer

Complete this step before visiting /install. Laravel requires a valid APP_KEY and correct database settings in .env.

  1. In File Manager, copy .env.example to .env (same folder as artisan).
  2. Edit .env and set at minimum:
    APP_NAME=FleetHub
    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=cpaneluser_fleethub
    DB_USERNAME=cpaneluser_admin
    DB_PASSWORD="your_password"
    
    SESSION_DRIVER=file
    CACHE_STORE=file
  3. Set DB_CONNECTION=mysql — the default .env.example uses SQLite; shared hosting requires MySQL.
  4. Set SESSION_DRIVER=file and CACHE_STORE=file before the first migration (avoids "sessions table not found" errors).
  5. Wrap DB_PASSWORD in double quotes if it contains special characters (#, $, !, etc.).

Generate APP_KEY (no Terminal required)

Many cPanel plans don't include a web Terminal. Use one of these methods:

  • SSH Access (cPanel → Security → SSH Access): connect with PuTTY or PowerShell, then run cd ~/public_html && php artisan key:generate.
  • File Manager helper — create public/genkey.php temporarily, visit it in your browser, copy the output into APP_KEY=, then delete the file immediately.
    <?php
    echo 'base64:' . base64_encode(random_bytes(32));
  • On your PC — if PHP is installed locally, run php -r "echo 'base64:'.base64_encode(random_bytes(32));" and paste the result into .env.
Security: Delete genkey.php as soon as you copy the key. Never leave helper scripts on a production server.
  • Set storage/ and bootstrap/cache/ permissions to 755 (recursive) if the installer reports write errors.

Step 6 — Run the web installer

  1. Open https://yourdomain.com/install in your browser.
  2. Step 1: Requirements — all checks must pass (green). Fix any missing PHP extensions in Step 1 above.
  3. Step 2: Database — enter the exact prefixed names from Step 3:
    • Host: 127.0.0.1 or localhost
    • Port: 3306
    • Database: cpaneluser_fleethub
    • Username: cpaneluser_admin
    • Password: (your MySQL password)
  4. Step 3: Migrate — click "Run Migrations & Seed". Takes ~10 seconds. Do not refresh the page.
  5. Uncheck Include demo data for a clean production install.
  6. Step 4: Admin — create your administrator account.
  7. Done! — save the Cron URL shown on the final screen.

Step 7 — Setup Cron Jobs for email alerts

FleetHub needs one cron job running every minute so Laravel can send compliance alerts, maintenance reminders, requisition overdue notices, and other scheduled emails.

  1. In cPanel, go to Advanced → Cron Jobs.
  2. Under Add New Cron Job, set schedule to Every minute (* * * * *).
  3. Enter the command (replace CPANELUSER with your cPanel username from General Information):
    /usr/local/bin/php /home/CPANELUSER/public_html/artisan schedule:run
    Tip: the PHP path may be /usr/local/bin/php or /usr/bin/php — ask your host if unsure. The artisan path is where you uploaded the project (usually /home/CPANELUSER/public_html/artisan).
  4. Click Add New Cron Job to save.
Document root set to public_html/public/? Cron still points to /home/CPANELUSER/public_html/artisan — do not add /public/.
No cron available? Use the in-app Cron URL instead:
  1. Login as admin → Settings → System → copy Cron URL.
  2. Register at cron-job.org (free).
  3. Create a job hitting that URL every 15 minutes.

Step 8 — Configure email (SMTP)

Create a cPanel email account for outgoing notifications:

  1. Go to Email Accounts → create e.g. noreply@yourdomain.com.
  2. Edit .env in File Manager:
    MAIL_MAILER=smtp
    MAIL_HOST=mail.yourdomain.com
    MAIL_PORT=587
    MAIL_USERNAME=noreply@yourdomain.com
    MAIL_PASSWORD=your_email_password
    MAIL_ENCRYPTION=tls
    MAIL_FROM_ADDRESS=noreply@yourdomain.com
    MAIL_FROM_NAME="Your Company Name"
  3. Save, then in FleetHub: Settings → Email → Send Test Email.
Shared hosting SMTP limits: Many cPanel hosts cap outgoing mail (~100–500/hour). For larger teams, use SendGrid, Mailgun, or Postmark.

Common issues on cPanel

"Access denied for user" (SQLSTATE 1045)

  • Copy database name and username exactly from cPanel — including the account prefix.
  • Confirm you completed Add User To Database with ALL PRIVILEGES.
  • Reset the MySQL password in cPanel and update .env — use quotes around DB_PASSWORD if it contains special characters.

Migration fails after Database step passed

  • The wizard tests credentials from the form, but Migrate reads .env. Make sure both match.
  • Delete bootstrap/cache/config.php if it exists, then retry.
  • Ensure DB_CONNECTION=mysql is set in .env (not sqlite).

"Invalid default value" during migration (1067)

MySQL strict mode on shared hosting may reject certain column defaults. Check storage/logs/laravel.log for the exact migration error and ensure PHP 8.2+ with all required extensions enabled.

"500 Internal Server Error" after upload

  • Verify root .htaccess exists and PHP is 8.2+.
  • Check storage/logs/laravel.log for the real error.
  • Confirm APP_KEY is set in .env — empty key causes 500 errors.

No Terminal in cPanel

This is normal on many shared plans. Use SSH Access (if enabled), the temporary genkey.php method in Step 5, or generate the key on your local PC.

QR scanner camera doesn't open

Enable SSL via SSL/TLS Status → AutoSSL and access the site via https://.

Configuration

.env File

KeyDescriptionExample
APP_NAMEApplication name shown in title barFleetHub
APP_URLPublic URL of your installationhttps://fleet.example.com
APP_DEBUGSet to false in productionfalse
DB_*Database connection detailsmysql, 127.0.0.1, 3306, ...
MAIL_MAILERMail driversmtp, log, mailgun
MAIL_HOSTSMTP server hostnamesmtp.gmail.com
MAIL_PORTSMTP port587
MAIL_USERNAMESMTP usernameyour@email.com
MAIL_PASSWORDSMTP password or app token**********
MAIL_FROM_ADDRESSDefault From addressnoreply@example.com

In-app Settings

Most non-sensitive options are configurable from Admin → Settings:

  • General: company name/email/phone, branding
  • Fleet: vehicle code prefix, handover checklist template, maintenance defaults, public vehicle page mode
  • Email: send a test email to verify SMTP
  • Notifications: toggle compliance, maintenance, requisition, and license alerts
  • Localization: timezone, date format, currency — applied app-wide
  • Compliance: manage compliance type presets (insurance, registration, road tax, etc.)
  • Branding: app name and logo — updates login, footer, and browser page title
  • Appearance: customize brand, status, and text colors for light and dark mode — see rebrand guide in the FAQ

Multi-Language Support

FleetHub ships with 11 languages out of the box, including RTL Arabic and Hindi. Users switch language via the flag dropdown in the top-right header.

Shipped languages

CodeLanguageDirection
enEnglish (default)LTR
viTiếng ViệtLTR
esEspañolLTR
frFrançaisLTR
deDeutschLTR
zh简体中文LTR
ja日本語LTR
pt-BRPortuguês (Brasil)LTR
ruРусскийLTR
arالعربيةRTL
hiहिन्दीLTR

How to switch language

  1. Click the flag icon in the top-right header to open the dropdown.
  2. Pick your language from the list.
  3. The page reloads; all UI labels, dates, and currency formats switch.
  4. Your choice is saved in both your user account and a cookie (1 year).
Don't open the app's .html files directly. FleetHub is a Laravel + Vue server-side app — language switching POSTs to /locale/{code}, which only works when a PHP server is running. Always access via your real domain (production) or http://localhost:8000 (dev with php artisan serve). Documentation files like this one, on the other hand, are fully standalone and can be opened directly.

Adding a custom language (admin)

Go to Administration → Translations (admin users with manage translations permission):

  • Click "Add Locale" — provide a code (e.g. mk for Macedonian), display name, native name, flag SVG filename, direction (LTR/RTL), and a base locale to copy translations from.
  • The new locale appears in the language switcher and Settings → Localization default-language list.
  • DB-stored translations automatically override file translations in lang/{code}/.

Translation Editor

The editor lists every translation key grouped by file (e.g. assets, nav, settings). Keys show the file baseline and any database override.

  • Filter by locale, translation group, or search text.
  • Click a value to edit inline; changes save to the database immediately.
  • Reset a key to revert to the file baseline.
  • Built-in locales (en, vi, es, …) can be edited; custom locales are fully DB-driven.
  • Only users with the manage translations permission can access this page.

CSV import / export

  • Export — download all keys for a locale as CSV (group,key,value).
  • Import — upload a CSV with the same columns; existing DB overrides are updated, new keys are inserted.

Per-user default locale

Each user has a locale column. Email notifications are automatically sent in the recipient's preferred language thanks to Laravel's HasLocalePreference contract.

The site default language is set under Settings → Localization → Default Language. Individual users override this via the header language switcher.

Feature List (15 Module Groups)

Vehicle Management

  • Auto-generated vehicle codes (VH prefix)
  • License plate, VIN, make, model, fuel type
  • QR code generation & batch print
  • Status, condition, odometer tracking
  • Bulk import/export Excel
  • Clone vehicle for identical fleet purchases
  • 7-tab detail page with lifecycle timeline

Requisitions & Handovers

  • Request → approve → return workflow
  • Calendar view & conflict detection
  • 2D damage mapper + digital signature
  • PDF handover report export

Maintenance

  • Preventive & corrective scheduling
  • Calendar view by priority
  • Auto-schedule next preventive
  • Cost tracking → auto expense sync
  • Email reminders before due date

Compliance & Fuel

  • Generic compliance items (insurance, registration, permits)
  • Driver license expiry tracking
  • Fuel logs with receipt upload & compression
  • Anti-fraud odometer validation

TCO & Depreciation

  • 3 depreciation methods incl. units of production (km)
  • TCO dashboard with cost/km metrics
  • Auto-sync fuel & maintenance to expenses
  • Depreciation curve charts

Reports

  • 7 fleet report types
  • Excel + PDF export
  • ApexCharts dashboards
  • Date range filters

Fleet Operations

  • Fleet Health Score with daily recalculation
  • Driver management with license sync
  • Vehicle expenses (insurance, toll, parking, etc.)
  • QR quick-scan for drivers (fuel, odometer, incident)

Localization

  • 11 built-in UI languages + custom locales
  • Translation Editor with search and inline edit
  • CSV import/export for bulk translation updates
  • Timezone & currency settings applied app-wide

Branding & Appearance

  • Browser page title from Settings → Branding → App Name
  • Customize app colors in Settings → Appearance (light & dark mode)

Users & Roles

FleetHub ships with 5 pre-configured roles for internal fleet operations:

RoleCapabilities
AdminFull system access — users, departments, settings, audit log, webhooks, translations
Fleet ManagerManage vehicles, drivers, requisitions, handovers, maintenance, fuel logs; approve requisitions; full reports access
AccountantTCO dashboard, expenses, depreciation, compliance reports — read-heavy financial focus
Department HeadApprove requisitions for own department, view department vehicles and reports
DriverView assigned vehicle, submit fuel logs, quick-scan actions, view own requisitions

Demo accounts (password: password): admin@fleethub.test, manager@fleethub.test, dept@fleethub.test, accountant@fleethub.test, driver@fleethub.test. Enable demo data during installation or seeding. Permissions are Spatie roles — administrators can fine-tune per-permission.

Vehicle Management

Creating Vehicles

  1. Navigate to Vehicles → New Vehicle.
  2. Fill in license plate, make, model, year, fuel type, category, and department.
  3. Add purchase date and cost (required for depreciation and TCO).
  4. Upload images (multiple files supported, max 5 MB each — auto-compressed on mobile).
  5. Save — vehicle code and QR code are auto-generated.

Vehicle Code Format

Default: {PREFIX}-{YEAR}-{NNNN}, e.g. VH-2026-0001. Configurable via Settings → Fleet → Vehicle Code Prefix.

Bulk Import

  1. Click Import on the Vehicles page.
  2. Download the Excel template.
  3. Fill in your data — required columns: license_plate, make, model, category_name.
  4. Upload the file.

QR Codes & Quick-Scan

Every vehicle automatically receives a QR code on creation. Scanning opens the public vehicle page or in-app quick actions for authenticated drivers.

Printing Labels

  • Single label: Click the printer icon on any vehicle row.
  • Batch print: Select multiple vehicles → Print QR Labels. A4 format, 2 labels per row.

In-App Scanning

Click Scan QR on the Vehicles page. Allow camera permission. Works on any modern browser with HTTPS or localhost.

Public Vehicle Page

Each vehicle has a public URL at /v/{vehicle_code} — useful for quick identification without logging in.

  • Configure in Settings → Fleet → Public Vehicle Page: Public, Login required, or Disabled.
  • Guest mode shows basic read-only info (plate, make/model). Driver quick actions require login.
  • After changing APP_URL, click Regenerate all QR codes in Settings.

Workflows

Vehicle Requisitions

Employees submit requisitions for vehicles they need. Flow: requested → approved → returned (or rejected). Fleet Manager or Department Head approves. Calendar view shows fleet-wide bookings. Overdue returns trigger email alerts.

Vehicle Handover

  1. When a requisition is approved, create an Outgoing Handover before the driver takes the vehicle.
  2. Record odometer, complete the checklist, mark damage on the 2D mapper, attach photos, and capture digital signature.
  3. Save and download the PDF handover report for your records.
  4. When the vehicle is returned, create an Incoming Handover — compare condition, update odometer, clear driver assignment.
  5. Completing incoming handover marks the requisition as returned and sets the vehicle status back to available.

Depreciation & TCO

FleetHub calculates vehicle depreciation using one of three methods. Depreciation feeds the TCO dashboard alongside fuel logs and expenses.

MethodFormulaUse Case
Straight Line(Cost - Salvage) / Useful LifeMost common; equal yearly depreciation
Declining Balance2 / Useful Life × Book ValueAccelerated; tax purposes
Units of Production(km this period / total expected km) × (Cost − Salvage)Vehicles with predictable total km (odometer-based)

Defaults inherit from the vehicle category. current_value is auto-updated monthly via fleethub:update-vehicle-values. TCO = purchase cost + sum of vehicle expenses in the selected period.

Custom Fields

Admin → Custom Fields lets you add unlimited custom attributes to vehicles:

  • Types: text, number, date, select (dropdown), textarea, file, checkbox
  • Scope: apply to all categories or specific vehicle category
  • Reorder: drag-and-drop the grip handle
  • Required fields are validated on vehicle save

Reports

Seven built-in fleet reports, accessible from the Reports menu:

  1. TCO Summary — total cost of ownership per vehicle and fleet-wide
  2. Depreciation Schedule — value loss per vehicle with export
  3. Maintenance Cost — spending by vehicle, type, and month
  4. Fuel Consumption & Cost — km/l trends with anomaly highlights
  5. Requisition Usage — booking percentage per vehicle over time
  6. Compliance Expiry — vehicle documents and driver licenses expiring soon
  7. Department Vehicle Allocation — vehicles and utilization by department

All reports support Excel and PDF export via buttons in the page header.

Webhooks

FleetHub can notify external services on key fleet events.

Available Events

  • vehicle.created, vehicle.updated, vehicle.deleted
  • requisition.approved, requisition.rejected, requisition.overdue, requisition.returned
  • handover.completed
  • compliance.expiring, compliance.expired
  • maintenance.due, maintenance.overdue, maintenance.completed
  • fleet_health_score.dropped

Payload Format

{
  "event": "handover.completed",
  "timestamp": "2026-06-23T08:00:00+00:00",
  "data": {
    "vehicle_id": 1,
    "vehicle_code": "VH-2026-0001",
    "license_plate": "51A-12345",
    "handover_id": 12,
    "direction": "outgoing",
    "driver_id": 4
  }
}

Signature Verification

If a secret is configured, requests include header X-FleetHub-Signature containing HMAC-SHA256 of the payload body. Verify on your end:

$expected = hash_hmac('sha256', $rawBody, $secret);
if (hash_equals($expected, $request->header('X-FleetHub-Signature'))) {
  // valid
}

Retry Policy

Failed deliveries retry 3 times with 200 ms delay. After 10 consecutive failures, the webhook is auto-disabled.

Scheduled Tasks

FleetHub uses Laravel's scheduler for background jobs. You only need one cron entry — Laravel dispatches each fleethub: command at the right time.

Shared hosting (cPanel / Hostinger Cron Jobs UI)

See cPanel Setup → Step 7 or Hostinger Setup → Step 5. In short: Advanced → Cron Jobs, command:

/usr/bin/php /home/uXXXXXX/public_html/artisan schedule:run

Schedule: every minute (* in all five fields).

cPanel cron command

Replace CPANELUSER with your cPanel username:

/usr/local/bin/php /home/CPANELUSER/public_html/artisan schedule:run

VPS / dedicated server (crontab)

Run crontab -e as your web user and add:

* * * * * cd /path/to/FleetHub && php artisan schedule:run >> /dev/null 2>&1

Fallback: external URL pinger

If your host has no cron, use the in-app Cron URL (Settings → System tab) with cron-job.org (free, every 15 min).

Jobs that run automatically

TimeCommandPurpose
Daily 08:00fleethub:send-requisition-overdue-alertsRequisition approved but not returned past requested end date
Daily 08:30fleethub:send-maintenance-remindersUpcoming maintenance reminders
Daily 09:00fleethub:send-compliance-expiry-alertsCompliance items expiring in 30/14/7/1 days
Daily 09:30fleethub:send-driver-license-alertsDriver license expiry alerts
Monthly 1st 02:00fleethub:update-vehicle-valuesRefresh vehicle current_value from depreciation
Daily 03:00fleethub:recalculate-fleet-health-scoreRecalculate and cache Fleet Health Score

Upgrade Guides

FleetHub v1.0.0 is the initial release on CodeCanyon.

FleetHub v1.0.0 is the first public release. There are no prior versions to upgrade from. Future upgrade guides will appear here when new versions are published.

Troubleshooting

"Permission denied" on storage

chmod -R 775 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache

QR code scanner doesn't open camera

Browser camera APIs require HTTPS. Install SSL or use localhost for testing.

Emails not arriving

Check storage/logs/laravel.log. Use Settings → Email → Send Test Email to verify SMTP.

Database "Access denied" (1045) on cPanel

Wrong username/password or missing user-to-database assignment. See cPanel Setup → Common issues.

Migration errors on shared hosting

Ensure SESSION_DRIVER=file and CACHE_STORE=file in .env before first migration. Check storage/logs/laravel.log for details.

Missing APP_KEY / 500 error before install

Laravel requires APP_KEY in .env. See cPanel Setup → Step 5 for generation methods without Terminal.

Reset installation

Delete storage/installed.lock and visit /install again. Existing data will be erased if you re-run migrations.

Performance — slow vehicle list

Run php artisan optimize. Ensure MySQL indexes on vehicles.vehicle_code, vehicles.license_plate, vehicles.status (created by migrations).

Changelog

v1.0.0 — Initial Release (2026-06)

  • Vehicle CRUD with QR code auto-generation and public page at /v/{vehicle_code}
  • 5 user roles (Admin, Fleet Manager, Department Head, Accountant, Driver)
  • Driver management with license expiry sync to compliance items
  • Vehicle requisition workflow with calendar and overdue alerts
  • Vehicle handover with 2D damage mapper, checklist, signature, and PDF
  • Fuel log management with odometer anti-fraud and auto expense sync
  • Vehicle expenses and TCO dashboard with cost/km analytics
  • Depreciation engine — straight line, declining balance, units of production (km)
  • Generic compliance items with 30/14/7/1 day expiry alerts
  • Maintenance scheduling with preventive auto-renewal and cost tracking
  • Fleet Health Score with daily recalculation and breakdown modal
  • 7 fleet reports with Excel and PDF export
  • Custom fields (7 types) scoped to vehicle categories
  • Webhooks with HMAC signing (X-FleetHub-Signature) and auto-retry
  • Audit log via Spatie Activitylog with diff viewer
  • Multi-language UI: 11 locales including RTL Arabic and Hindi
  • Settings UI for company, fleet, email, notifications, compliance presets
  • Web-based installation wizard with demo data seeder
  • Dark mode, mobile-first UI, image compression for uploads

Credits

Open-source libraries used