Meal Management
- - - - - - - - -| Day | -Type | -Name | -Description | -Actions | -
|---|---|---|---|---|
| No meals found. Add one above! | -||||
| - | - | - | - | - Edit - - | -
diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a186cd2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 + +[compose.yaml] +indent_size = 4 diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..c0660ea --- /dev/null +++ b/.env.example @@ -0,0 +1,65 @@ +APP_NAME=Laravel +APP_ENV=local +APP_KEY= +APP_DEBUG=true +APP_URL=http://localhost + +APP_LOCALE=en +APP_FALLBACK_LOCALE=en +APP_FAKER_LOCALE=en_US + +APP_MAINTENANCE_DRIVER=file +# APP_MAINTENANCE_STORE=database + +# PHP_CLI_SERVER_WORKERS=4 + +BCRYPT_ROUNDS=12 + +LOG_CHANNEL=stack +LOG_STACK=single +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=debug + +DB_CONNECTION=sqlite +# DB_HOST=127.0.0.1 +# DB_PORT=3306 +# DB_DATABASE=laravel +# DB_USERNAME=root +# DB_PASSWORD= + +SESSION_DRIVER=database +SESSION_LIFETIME=120 +SESSION_ENCRYPT=false +SESSION_PATH=/ +SESSION_DOMAIN=null + +BROADCAST_CONNECTION=log +FILESYSTEM_DISK=local +QUEUE_CONNECTION=database + +CACHE_STORE=database +# CACHE_PREFIX= + +MEMCACHED_HOST=127.0.0.1 + +REDIS_CLIENT=phpredis +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_MAILER=log +MAIL_SCHEME=null +MAIL_HOST=127.0.0.1 +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_FROM_ADDRESS="hello@example.com" +MAIL_FROM_NAME="${APP_NAME}" + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= +AWS_USE_PATH_STYLE_ENDPOINT=false + +VITE_APP_NAME="${APP_NAME}" diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fcb21d3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +* text=auto eol=lf + +*.blade.php diff=html +*.css diff=css +*.html diff=html +*.md diff=markdown +*.php diff=php + +/.github export-ignore +CHANGELOG.md export-ignore +.styleci.yml export-ignore diff --git a/.gitignore b/.gitignore index e427ff3..b71b1ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,24 @@ -node_modules/ -*/node_modules/ -*/build/ +*.log +.DS_Store +.env +.env.backup +.env.production +.phpactor.json +.phpunit.result.cache +/.fleet +/.idea +/.nova +/.phpunit.cache +/.vscode +/.zed +/auth.json +/node_modules +/public/build +/public/hot +/public/storage +/storage/*.key +/storage/pail +/vendor +Homestead.json +Homestead.yaml +Thumbs.db diff --git a/.htaccess b/.htaccess deleted file mode 100644 index e2bbc23..0000000 --- a/.htaccess +++ /dev/null @@ -1,18 +0,0 @@ -DirectoryIndex index.php index.html -Options -Indexes -Options -MultiViews - -RewriteEngine On - -# 0) Serve existing files/directories as-is -RewriteCond %{REQUEST_FILENAME} -f [OR] -RewriteCond %{REQUEST_FILENAME} -d -RewriteRule ^ - [L] - -# 1) Internal map: /page or /page/ -> /page.php (if such PHP file exists) -RewriteCond %{REQUEST_FILENAME}.php -f -RewriteRule ^(.+?)/?$ $1.php [L] - -# 2) Optional: strip trailing slash for non-directories (keeps .php links working) -RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule ^(.+)/$ $1 [R=301,L] diff --git a/.perm_test_exec b/.perm_test_exec deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md new file mode 100644 index 0000000..0165a77 --- /dev/null +++ b/README.md @@ -0,0 +1,59 @@ +
+ + + +## About Laravel + +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](https://laravel.com/docs/routing). +- [Powerful dependency injection container](https://laravel.com/docs/container). +- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. +- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). +- Database agnostic [schema migrations](https://laravel.com/docs/migrations). +- [Robust background job processing](https://laravel.com/docs/queues). +- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). + +Laravel is accessible, powerful, and provides tools required for large, robust applications. + +## Learning Laravel + +Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. You can also check out [Laravel Learn](https://laravel.com/learn), where you will be guided through building a modern Laravel application. + +If you don't feel like reading, [Laracasts](https://laracasts.com) 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. + +## Laravel Sponsors + +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](https://partners.laravel.com). + +### Premium Partners + +- **[Vehikl](https://vehikl.com)** +- **[Tighten Co.](https://tighten.co)** +- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** +- **[64 Robots](https://64robots.com)** +- **[Curotec](https://www.curotec.com/services/technologies/laravel)** +- **[DevSquad](https://devsquad.com/hire-laravel-developers)** +- **[Redberry](https://redberry.international/laravel-development)** +- **[Active Logic](https://activelogic.com)** + +## Contributing + +Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). + +## Code of Conduct + +In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). + +## Security Vulnerabilities + +If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. + +## License + +The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). diff --git a/admin.php b/admin.php deleted file mode 100644 index ecc9035..0000000 --- a/admin.php +++ /dev/null @@ -1,221 +0,0 @@ - 'Normal', 'V' => 'Vegetarian', 'G' => 'Vegan']; - return $types[$char] ?? 'Unknown'; -} - -$message = ''; -$error = ''; -$edit_meal = null; - -try { - $pdo = db(); - - // Handle Delete - if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['delete_id'])) { - $stmt = $pdo->prepare("DELETE FROM meals WHERE id = ?"); - $stmt->execute([$_POST['delete_id']]); - $message = 'Meal deleted successfully!'; - } - // Handle Add/Update - elseif ($_SERVER['REQUEST_METHOD'] === 'POST') { - $day_of_week = $_POST['day_of_week'] ?? ''; - $meal_type = $_POST['meal_type'] ?? ''; - $name = $_POST['name'] ?? ''; - $description = $_POST['description'] ?? ''; - $id = $_POST['update_id'] ?? null; - - if (empty($day_of_week) || empty($meal_type) || empty($name)) { - $error = 'Please fill in all required fields (Day, Meal Type, Name).'; - } else { - if ($id) { - // Update - $stmt = $pdo->prepare("UPDATE meals SET day_of_week = ?, meal_type = ?, name = ?, description = ? WHERE id = ?"); - $stmt->execute([$day_of_week, $meal_type, $name, $description, $id]); - $message = 'Meal updated successfully!'; - } else { - // Insert - $stmt = $pdo->prepare("INSERT INTO meals (day_of_week, meal_type, name, description) VALUES (?, ?, ?, ?)"); - $stmt->execute([$day_of_week, $meal_type, $name, $description]); - $message = 'Meal added successfully!'; - } - } - } - - // Handle Edit - Fetch meal to edit - if (isset($_GET['edit_id'])) { - $stmt = $pdo->prepare("SELECT * FROM meals WHERE id = ?"); - $stmt->execute([$_GET['edit_id']]); - $edit_meal = $stmt->fetch(PDO::FETCH_ASSOC); - } - - // Fetch all meals for display - $stmt = $pdo->query("SELECT * FROM meals ORDER BY FIELD(day_of_week, 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'), meal_type"); - $meals = $stmt->fetchAll(PDO::FETCH_ASSOC); - -} catch (PDOException $e) { - $error = 'Database error: ' . $e->getMessage(); - $meals = []; -} - -?> - - - - - -| Day | -Type | -Name | -Description | -Actions | -
|---|---|---|---|---|
| No meals found. Add one above! | -||||
| - | - | - | - | - Edit - - | -
The future of school meal management is here. Simple, transparent, and efficient.
- View This Week's Menu -Easily check the upcoming weekly menu with detailed descriptions and allergen info.
-Pre-order your meals for the week with just a few clicks. Cancel anytime before the deadline.
-Manage your balance and pay for your meals securely online or in person.
-Name: {$safeName}
Email: {$safeEmail}
Here are the meal options for the upcoming week. Orders can be placed until 10:00 AM for the next day.
-Username:
-Email:
-Laravel has an incredibly rich ecosystem.
We suggest starting with the following.