Overview
TableFlow is a standard Laravel 12 application — there's no custom installer, no build pipeline, and no external services required to get it running beyond a MySQL database. All admin-panel styling (Bootstrap 5, Select2, DataTables, SweetAlert2, Chart.js) loads from CDN, so a plain composer install is all the setup you need on the PHP side.
Requirements
- PHP 8.2+ with extensions:
pdo_mysql,mbstring,openssl,tokenizer,xml,ctype,json,bcmath,fileinfo,zip, andgdorimagick - Composer 2.x
- MySQL 5.7+ or MySQL 8 (a database created and ready to use)
- A web server — Apache/Nginx for production, or just
php artisan servefor local development
1Install Dependencies
From the project root, install all PHP packages with Composer:
composer install --optimize-autoloader
This pulls in Laravel 12, Sanctum (API auth), DomPDF (invoices), Simple QRCode, Maatwebsite Excel (exports), and Intervention Image (image resizing).
2Environment Setup
Copy the example environment file and generate your application key:
cp .env.example .env
php artisan key:generate
Open .env and fill in your database credentials:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=restaurant_management
DB_USERNAME=root
DB_PASSWORD=your_password_here
Set your site URL — this is used to build QR codes, invoice links, and API image URLs:
APP_URL=https://yourdomain.com
3Database & Seeding
Run the migrations and seed demo data in one command:
php artisan migrate --seed
This creates every table and seeds:
- Three staff accounts —
admin@restaurant.test,manager@restaurant.test,chef@restaurant.test(password:password) - Sample categories and menu items, ready to browse immediately
- 10 restaurant tables, each with an auto-generated QR code
- All 6 AI feature toggles, enabled by default
4Enable AI Features
To turn on the six AI features (menu writer, forecasting, chatbot, upsells, demand prediction, review sentiment), add your Anthropic API key to .env:
ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxx
ANTHROPIC_MODEL=claude-sonnet-4-6
Then log in as an admin and visit Settings → AI Features to confirm the master switch and each individual feature are turned on to your liking.
5Run Locally
php artisan serve
Visit http://localhost:8000/login and sign in with one of the seeded accounts above. That's it — menu, orders, kitchen display, tables, and reports are all live with sample data.
6Deploy to Shared Hosting
TableFlow follows a standard shared-hosting-friendly Laravel structure — uploads go straight to public/uploads/, so no symlinks are needed.
- Upload the whole project to a folder outside your public web root if your host allows it (e.g.
~/app/tableflow), then point your domain or subdomain's document root at itspublic/folder. - If your host only offers a
public_htmlstructure, upload the project into a subfolder and copy the contents ofpublic/intopublic_html/— then edit the tworequirepaths at the top ofpublic_html/index.phpto point at your actualbootstrap/app.phpandvendor/autoload.phplocations. - Run
composer install --optimize-autoloader --no-devon the server via SSH (or upload a pre-builtvendor/folder if Composer isn't available). - Set up
.envwith your production database credentials and liveAPP_URL. - Run
php artisan migrate --seedonce, on first deploy only. - Make sure
storage/andpublic/uploads/are writable:chmod -R 775 storage public/uploads. - Set
APP_ENV=productionandAPP_DEBUG=falsebefore going live.
7Post-Deploy Checklist
- ✅ Changed all three seeded staff passwords
- ✅ Set a real
ANTHROPIC_API_KEY, or confirmed the AI master switch is intentionally off - ✅ Configured
restaurant_name, address, tax rate, and currency under Admin → Settings → General - ✅ Printed and placed table QR codes (Admin → Tables & QR)
- ✅ Confirmed
APP_DEBUG=falsein production - ✅ Set up a real mail driver in
.envso password resets actually deliver
Troubleshooting
QR codes aren't generating
Confirm the GD or Imagick PHP extension is enabled — simplesoftwareio/simple-qrcode needs one of them. QR generation fails silently and the table still saves, so check your PHP error log if codes are blank.
AI buttons say "unavailable"
This means either the master AI switch is off (Admin → Settings → AI Features), the specific feature's toggle is off, or ANTHROPIC_API_KEY is missing from .env. Check the warning banner on the AI Features settings page — it tells you exactly which one.
Uploaded images return 404
Confirm public/uploads/ exists and is writable. Unlike a typical Laravel app, this project stores uploads directly under the public folder (no storage:link needed) — if the folder was excluded during deployment, recreate it.
500 error immediately after deploy
Almost always a missing APP_KEY or unwritable storage/ folder. Run php artisan key:generate and re-check folder permissions.