Introduction
This quickstart guide walks you through the essential steps to get your restaurant site operational, from logging in as an admin to processing your first customer order.Before starting, ensure you’ve completed the Installation guide and have the application running at
http://localhost:8000Overview
In this guide, you’ll:- Log in as an admin user
- Create food categories
- Add menu items with details
- Test the customer ordering flow
- Manage orders in the admin panel
Step-by-Step Guide
Access the Application
Open your browser and navigate to the application:You should see the restaurant homepage with a navigation menu.
Log in as Admin
Click the Login button in the navigation menu and use the seeded admin credentials:After successful login, you’ll be redirected to the admin dashboard at
/admin/dashboard.Explore the Admin Dashboard
The admin dashboard provides access to:
- Users Management - Create and manage staff accounts
- Food Menu - Add and edit menu items
- Categories - Organize menu items
- Tables - Manage restaurant tables
- Reservations - Handle table bookings
- Orders - View and process customer orders
- Chefs - Manage chef profiles
Create Menu Categories
Before adding food items, create some categories:
- Go to Admin > Categories (or use the existing seeded categories)
- Click Add Category
- Create categories like:
- Appetizers
- Main Courses
- Desserts
- Beverages
- Specials
Categories are automatically seeded during installation via
CategorySeeder, but you can add more as needed.Add Your First Menu Item
Now add a food item to the menu:
- Navigate to Admin > Foods in the sidebar
- Click Create Food or Add New Item
- Fill in the details:
- Click Save to create the item
food table:Test the Customer Experience
Now test the ordering flow from a customer’s perspective:
- Log out from the admin account
- Register a new customer account or use the seeded customer:
- You’ll be redirected to the homepage
Browse the Menu
As a customer:
- Click Menu in the navigation
- Browse the food items you created
- Click on an item to view details
comidaview route:routes/web.php
HomeController.php
Add Items to Cart
Select items and add them to your cart:
- Click on a food item (e.g., “Grilled Salmon”)
- View the detailed information
- Click Add to Cart
- The cart count in the navigation will update
routes/web.php
Only authenticated users can add items to cart. Guest users will be redirected to login.
View and Update Cart
Check your cart:
- Click the Cart icon in the navigation
- Review the items and quantities
- Update quantities or remove items as needed
- See the total price update dynamically
Place an Order
Complete the checkout process:
- From the cart page, click Proceed to Checkout
- Fill in delivery details:
- Review your order items
- Click Confirm Order
orderConfirm method:HomeController.php
View Orders as Admin
Switch back to the admin account to manage orders:
- Log out from the customer account
- Log in as admin (
admin@gmail.com/admin1234) - Go to Admin > Orders
- You’ll see the order you just placed
- Click to view order details:
- Customer information
- Order items with quantities
- Total amount
- Order status (pending, preparing, delivered)
routes/web.php
Test Other User Roles
Explore the different role capabilities:Chef Account (Waiter Account (
chef@gmail.com / chef1234):- Access admin panel
- Manage food menu items
- View chef profile
- Cannot access user management
routes/web.php
mesero@gmail.com / mesero1234):- Access admin panel
- Manage tables and reservations
- Assign tables to customers
- Cannot manage menu items
routes/web.php
Understanding the Data Flow
Order Processing Flow
Role-Based Access
The system uses Spatie Laravel Permission for role management:User Model
Database Relationships
Configuration Tips
Customize Application Name
Update your.env file:
.env
Set Application URL
.env
Configure File Uploads
For food images, ensure storage is properly linked:storage/app/public/ and accessed via public/storage/.
Common Tasks
Create a New Admin User
Bulk Import Menu Items
Create a custom seeder:database/seeders/MenuSeeder.php
Clear All Orders (Development)
Testing the API
If you plan to use the API endpoints:Authenticate with Sanctum
Fetch Menu Items
Next Steps
Now that you have a working restaurant site:Authentication Guide
Deep dive into the multi-role authentication system
Menu Management
Learn advanced menu management features
Order Processing
Understand the complete order workflow
Configuration
Customize the configuration of your restaurant site
Troubleshooting
Cannot Add Items to Cart
Cannot Add Items to Cart
Issue: “Please login to add items to cart” messageSolution: Cart functionality requires authentication. Ensure you’re logged in:
Order Confirmation Fails
Order Confirmation Fails
Issue: Order not created, transaction rolled backPossible Causes:
- Missing required fields (name, phone)
- Food item doesn’t exist
- Database connection issue
Role Middleware Blocking Access
Role Middleware Blocking Access
Issue: Redirected when accessing admin routesSolution: Verify user has correct role assigned:
Images Not Displaying
Images Not Displaying
Issue: Food images showing broken linksSolution: