This project is a comprehensive Laravel application designed to manage products, categories, and application-wide settings. The admin dashboard offers powerful tools to control various aspects of the application, including authentication, dynamic settings, and an intuitive interface powered by modern web development technologies.
-
Product Management
- Full CRUD operations for products.
- Manage attributes such as:
- Prices (original and discounted).
- Preparation time (e.g., for food items).
- Features such as "spicy," "vegan," and "top seller."
- Image upload support with Laravel's storage system.
- Filter and search options for streamlined product discovery.
-
Category Management
- CRUD operations for categories.
- Advanced sorting powered by Sortify.js for drag-and-drop reordering.
- Toggle
enabled
andfeatured
statuses for each category. - Categories linked to products with soft delete functionality.
-
Settings Management
- Update global application preferences through an admin interface.
- Configurable options include:
- Display formats (e.g., card or list view).
- Theme selection (light/dark mode).
- Currency settings.
- Menu design layout.
- Feature toggles such as showing images, descriptions, and preparation times.
-
User Interface Features
- Dynamic Dashboard: Includes metrics and charts to display key application statistics (e.g., product counts by category).
- Responsive Design: Built with TailwindCSS and DaisyUI to provide a seamless experience on both desktop and mobile.
- Authentication Middleware: Restricts access to admin routes to logged-in users.
- Security Practices: Admin panel is accessible only through
/admin
to reduce exposure.
- Frontend powered by Blade templates with reusable components.
- Backend APIs utilize AJAX for real-time updates.
- Real-time sorting and toggling for categories and products.
Before you begin, ensure your system meets the following requirements:
- PHP >= 8.0
- Composer
- Laravel Framework
- Node.js and npm (for frontend dependencies)
-
Clone the repository:
git clone https://github.com/Omar7tech/Resturant_menu_advanced
-
Navigate to the project directory:
cd Resturant_menu_advanced
-
Install dependencies:
composer install npm install
-
Set up your environment file:
cp .env.example .env
Update
.env
with database credentials, mail configuration, and other relevant settings. -
Run migrations and seeders to set up the database schema and initial data:
php artisan migrate --seed
-
Serve the application:
php artisan serve
Visit the application at
http://127.0.0.1:8000
.
The routes are defined in web.php
and follow a clear hierarchy:
/
: User-facing homepage displaying categorized and uncategorized products./about
: Static page for informational content./admin
: Admin dashboard (authentication required).
Admin-specific routes are grouped under the admin
prefix and middleware for enhanced organization:
- Settings Management:
/admin/settings
(GET/POST)
- Categories Management:
/admin/categories
(CRUD with sortable features)
- Products Management:
/admin/products
(CRUD with image management)
-
Categories Table
- Stores category details and supports sorting and soft deletes.
- Key fields:
id
,name
,description
,enabled
,featured
,sort
.
-
Products Table
- Stores product details with foreign key linking to categories.
- Key fields:
id
,name
,price
,new_price
,preparation_time
,image_url
,category_id
.
-
Settings Table
- Stores global application settings in a key-value pair format.
- CategoryController
- Handles CRUD operations for categories.
- Provides APIs for sorting, enabling/disabling, and toggling featured status.
- ProductController
- Manages products, including image uploads, CRUD operations, and toggling features.
- SettingsController
- Updates and stores global application settings.
- HomeController
- Manages user-facing pages and admin dashboard metrics.
- Built using TailwindCSS and DaisyUI for effortless customization.
- Toggle between dark and light modes directly from the admin interface.
- The sortable feature is implemented using Sortify.js for a drag-and-drop interface.
- Admin can control visibility and layout of elements on the frontend (e.g., product descriptions, calorie counts).
- Category and product toggles use AJAX for real-time updates.
- Sorting operations send asynchronous requests to persist changes.
The application ships with a seeder (SettingsSeeder
) to pre-populate default configurations.
We welcome contributions! Follow these steps to contribute:
- Fork the repository.
- Create a feature branch (
git checkout -b feature-name
). - Commit your changes (
git commit -m 'Add feature-name'
). - Push to the branch (
git push origin feature-name
). - Submit a pull request.
- Missing
.env
Configuration:- Ensure you copy
.env.example
to.env
and provide valid credentials.
- Ensure you copy
- Database Errors:
- Run
php artisan migrate --seed
to initialize tables and default data.
- Run
This project is licensed under the MIT License.
For support or questions, please reach out to: omar.7tech@gmail.com
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
- Simple, fast routing engine.
- Powerful dependency injection container.
- Multiple back-ends for session and cache storage.
- Expressive, intuitive database ORM.
- Database agnostic schema migrations.
- Robust background job processing.
- Real-time event broadcasting.
Laravel is accessible, powerful, and provides tools required for large, robust applications.
Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.
If you don't feel like reading, Laracasts can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Partners program.
- Vehikl
- Tighten Co.
- WebReinvent
- Kirschbaum Development Group
- 64 Robots
- Curotec
- Cyber-Duck
- DevSquad
- Jump24
- Redberry
- Active Logic
- byte5
- OP.GG
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.
In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.
The Laravel framework is open-sourced software licensed under the MIT license.