{"id":14975148,"url":"https://github.com/basemax/cruiselaravelgraphql","last_synced_at":"2025-10-27T12:32:05.768Z","repository":{"id":190942517,"uuid":"680315292","full_name":"BaseMax/CruiseLaravelGraphQL","owner":"BaseMax","description":"CruiseGraphQL is an innovative car rental platform leveraging GraphQL. Engineered using Laravel 10 and PHP 8.2, it streamlines car reservations, monitors vehicle availability, and employs Redis caching for enhanced performance.","archived":false,"fork":false,"pushed_at":"2024-12-10T01:27:54.000Z","size":3017,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-04T07:15:37.346Z","etag":null,"topics":["api","graphql","graphql-api","graphql-schema","graphql-server","laravel","laravel-graphql","laravel10","php","php-graphql","php-laravel","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-18T22:09:37.000Z","updated_at":"2024-11-13T21:32:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"c114f1f3-b70f-4350-8bd3-d4b588d45715","html_url":"https://github.com/BaseMax/CruiseLaravelGraphQL","commit_stats":{"total_commits":22,"total_committers":3,"mean_commits":7.333333333333333,"dds":"0.36363636363636365","last_synced_commit":"418081f7201ed98b7fde1d32b2157c149a9687dc"},"previous_names":["basemax/cruiselaravelgraphql"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCruiseLaravelGraphQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCruiseLaravelGraphQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCruiseLaravelGraphQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCruiseLaravelGraphQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/CruiseLaravelGraphQL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238497545,"owners_count":19482272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","graphql","graphql-api","graphql-schema","graphql-server","laravel","laravel-graphql","laravel10","php","php-graphql","php-laravel","php8"],"created_at":"2024-09-24T13:51:34.840Z","updated_at":"2025-10-27T12:32:03.442Z","avatar_url":"https://github.com/BaseMax.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CruiseGraphQL: Innovative Car Rental Laravel Platform\n\nWelcome to CruiseGraphQL, an innovative car rental platform that harnesses the power of GraphQL. This project is developed using Laravel 10 and PHP 8.2, offering a streamlined approach to car reservations, real-time vehicle availability tracking, and optimized performance through Redis caching.\n\nCruiseGraphQL is an innovative car rental platform leveraging GraphQL. Engineered using Laravel 10 and PHP 8.2, it streamlines car reservations, monitors vehicle availability, and employs Redis caching for enhanced performance.\n\n## Features\n\n- **Car Rental Simplified:** CruiseGraphQL provides a user-friendly experience for browsing and renting cars.\n- **Effortless Booking Management:** Users can easily create, modify, and manage their car rental bookings.\n- **Real-time Vehicle Availability:** The system ensures up-to-date information on car availability.\n- **GraphQL API:** CruiseGraphQL exposes a GraphQL API for flexible queries and mutations.\n- **Enhanced Performance:** Redis caching is implemented to optimize data retrieval and reduce database load.\n- **Laravel 10 and PHP 8.2:** Built on the latest technologies to ensure a modern and robust foundation.\n\n## Installation\n\nClone the repository from GitHub.\n\n```bash\ngit clone https://github.com/BaseMax/CruiseLaravelGraphQL.git\n```\n\nNavigate to the project directory.\n\n```bash\ncd CruiseLaravelGraphQL\n```\n\nInstall project dependencies using Composer.\n\n```bash\ncomposer install\n```\n\nDuplicate `.env.example` and rename the copy to `.env`.\n\n```bash\ncp .env.example .env\n```\n\nConfigure `.env` with your database and Redis settings.\n\nRun database migrations and seeders to set up the initial database structure and sample data.\n\n```bash\nphp artisan migrate\n```\n\nStart the development server.\n\n```bash\nphp artisan serve\n```\n\nRun unit tests:\n\n```bash\nphp artisan test\n```\n\nAccess the GraphQL Playground at `http://localhost:8000/graphiql` in your web browser.\n\n## GraphQL API\n\nExplore and interact with the CruiseGraphQL API using the integrated GraphQL Playground. Test various queries and mutations to experience the platform's capabilities firsthand.\n\nHere are some examples:\n\nQuery available cars:\n\n```graphql\nquery {\n  availableCars {\n    id\n    make\n    model\n    year\n    ...\n  }\n}\n```\n\nCreate a booking:\n\n```graphql\nmutation {\n  createBooking(input: {\n    userId: 1,\n    carId: 3,\n    pickupDate: \"2023-08-20\",\n    returnDate: \"2023-08-25\"\n  }) {\n    id\n    user {\n      name\n    }\n    car {\n      make\n      model\n    }\n    ...\n  }\n}\n```\n\n## GraphQL\n\n| Query/Mutation      | Description                                                       | Example |\n|--------------------|-------------------------------------------------------------------|---------|\n| `availableCars`    | Fetch a list of available cars.                                   | `query { availableCars { id make model year ... } }` |\n| `car`              | Get details of a specific car by ID.                              | `query { car(id: 1) { id make model year ... } }` |\n| `user`             | Retrieve details of a user by ID.                                 | `query { user(id: 2) { id name email ... } }` |\n| `booking`          | Fetch details of a booking by ID.                                 | `query { booking(id: 5) { id user { name } car { make model } ... } }` |\n| `userBookings`     | Get a list of bookings made by a specific user.                  | `query { userBookings(userId: 3) { id car { make model } ... } }` |\n| `createBooking`    | Create a new booking.                                             | `mutation { createBooking(input: { userId: 4 carId: 7 pickupDate: \"2023-08-20\" returnDate: \"2023-08-25\" }) { id user { name } car { make model } ... } }` |\n| `updateBooking`    | Update an existing booking.                                       | `mutation { updateBooking(id: 8 input: { pickupDate: \"2023-09-01\" }) { id pickupDate returnDate ... } }` |\n| `cancelBooking`    | Cancel a booking.                                                 | `mutation { cancelBooking(id: 10) }` |\n| `carCategories`    | Retrieve a list of available car categories.                      | `query { carCategories { id name description ... } }` |\n| `carCategory`      | Get details of a specific car category by ID.                     | `query { carCategory(id: 3) { id name description ... } }` |\n| `addCar`           | Add a new car to the system.                                      | `mutation { addCar(input: { make: \"Toyota\" model: \"Corolla\" year: 2023 ... }) { id make model ... } }` |\n| `updateCar`        | Update car details.                                               | `mutation { updateCar(id: 5 input: { year: 2022 }) { id make model ... } }` |\n| `deleteCar`        | Remove a car from the system.                                     | `mutation { deleteCar(id: 7) }` |\n| `addUser`          | Register a new user.                                              | `mutation { addUser(input: { name: \"John Doe\" email: \"john@example.com\" ... }) { id name email ... } }` |\n| `updateUser`       | Update user details.                                              | `mutation { updateUser(id: 9 input: { name: \"Jane Smith\" }) { id name email ... } }` |\n| `deleteUser`       | Remove a user from the system.                                    | `mutation { deleteUser(id: 11) }` |\n| `addCarCategory`   | Add a new car category.                                           | `mutation { addCarCategory(input: { name: \"SUV\" description: \"Sport Utility Vehicle\" ... }) { id name description ... } }` |\n| `updateCarCategory`| Update car category details.                                      | `mutation { updateCarCategory(id: 13 input: { description: \"All-terrain vehicles\" }) { id name description ... } }` |\n| `deleteCarCategory`| Remove a car category from the system.                            | `mutation { deleteCarCategory(id: 15) }` |\n| `userLogin`        | Authenticate a user.                                              | `mutation { userLogin(email: \"john@example.com\" password: \"securepassword\") { token user { name } ... } }` |\n| `userLogout`       | Log out a user.                                                   | `mutation { userLogout }` |\n| `allBookings`      | Fetch a paginated list of all bookings.                           | `query { allBookings(page: 2, perPage: 10) { totalPerPage currentPage lastPage data { id user { name } car { make model } ... } } }` |\n| `searchCars`       | Search for cars based on specific criteria.                       | `query { searchCars(keyword: \"SUV\", year: 2022) { id make model year ... } }` |\n| `bookingsByStatus` | Retrieve bookings based on their status.                          | `query { bookingsByStatus(status: \"pending\") { id user { name } car { make model } ... } }` |\n| `totalRevenue`     | Calculate the total revenue generated from bookings.              | `query { totalRevenue }` |\n| `cancelBooking`    | Cancel a booking.                                                 | `mutation { cancelBooking(id: 17) }` |\n| `userDashboard`    | Fetch a user's dashboard statistics.                              | `query { userDashboard(userId: 6) { totalBookings upcomingBookings revenue ... } }` |\n| `carAvailability`  | Check the availability of a specific car for a given time period. | `query { carAvailability(carId: 9 startDate: \"2023-09-01\" endDate: \"2023-09-10\") }` |\n| `extendBooking`    | Extend the return date of a booking.                              | `mutation { extendBooking(id: 19 newReturnDate: \"2023-09-15\") { id returnDate ... } }` |\n| `mostPopularCars`  | Get a list of the most popular cars based on booking frequency.   | `query { mostPopularCars(limit: 5) { id make model bookingCount ... } }` |\n| `topUsers`         | Retrieve the top users with the highest number of bookings.       | `query { topUsers(limit: 3) { id name totalBookings ... } }` |\n| `bookingsByCar`        | Fetch all bookings for a specific car.                            | `query { bookingsByCar(carId: 12) { id user { name } pickupDate returnDate ... } }` |\n| `carsByCategory`       | Get a list of cars belonging to a specific category.              | `query { carsByCategory(categoryId: 4) { id make model ... } }` |\n| `totalBookingsByUser`   | Count the total number of bookings made by a specific user.       | `query { totalBookingsByUser(userId: 8) }` |\n| `userLastBooking`      | Retrieve the last booking made by a user.                         | `query { userLastBooking(userId: 10) { id car { make model } ... } }` |\n| `carDetailsWithBookings`| Get car details along with their associated bookings.            | `query { carDetailsWithBookings(carId: 15) { id make model bookings { id pickupDate returnDate ... } } }` |\n| `bookingsBetweenDates` | Fetch bookings that fall within a specific date range.            | `query { bookingsBetweenDates(startDate: \"2023-09-01\" endDate: \"2023-09-15\") { id user { name } pickupDate returnDate ... } }` |\n| `deleteBooking`        | Delete a booking by ID.                                           | `mutation { deleteBooking(id: 21) }` |\n| `addReview`            | Add a review for a booked car.                                    | `mutation { addReview(input: { userId: 12 carId: 18 rating: 4 reviewText: \"Great experience!\" }) { id rating reviewText ... } }` |\n| `userReviews`          | Retrieve reviews submitted by a user.                             | `query { userReviews(userId: 14) { id car { make model } rating reviewText ... } }` |\n| `averageRatingForCar`  | Calculate the average rating for a specific car.                  | `query { averageRatingForCar(carId: 20) }` |\n| `highestRevenueCars`   | Get a list of cars with the highest revenue generated.            | `query { highestRevenueCars(limit: 3) { id make model revenue ... } }` |\n| `upcomingBookings`     | Fetch upcoming bookings for a specific user.                      | `query { upcomingBookings(userId: 16) { id car { make model } pickupDate returnDate ... } }` |\n| `recentlyAddedCars`     | Retrieve a list of recently added cars.                           | `query { recentlyAddedCars(limit: 5) { id make model year ... } }` |\n| `bookingByUserAndCar`   | Fetch a specific booking made by a user for a particular car.    | `query { bookingByUserAndCar(userId: 18 carId: 25) { id user { name } car { make model } ... } }` |\n| `mostActiveUsers`       | Get a list of the most active users based on booking count.      | `query { mostActiveUsers(limit: 10) { id name totalBookings ... } }` |\n| `carsWithReviews`       | Retrieve cars along with their associated reviews.               | `query { carsWithReviews(limit: 10) { id make model reviews { id user { name } rating ... } } }` |\n| `availableCarCategories`| Fetch a list of currently available car categories.              | `query { availableCarCategories { id name description ... } }` |\n| `carCategoryCars`       | Get a list of cars belonging to a specific car category.          | `query { carCategoryCars(categoryId: 7) { id make model ... } }` |\n| `userTotalSpent`        | Calculate the total amount spent by a specific user on bookings. | `query { userTotalSpent(userId: 20) }` |\n| `userReviewsWithCars`   | Retrieve user reviews along with the corresponding car details.  | `query { userReviewsWithCars(userId: 22) { id rating reviewText car { make model ... } } }` |\n| `bookingsWithReviews`   | Get bookings along with their associated reviews.                | `query { bookingsWithReviews(limit: 5) { id user { name } car { make model } reviews { rating reviewText ... } } }` |\n| `highestRatedCars`      | Fetch cars with the highest average ratings.                     | `query { highestRatedCars(limit: 3) { id make model averageRating ... } }` |\n| `carsByMakeAndModel`    | Search for cars based on make and model.                         | `query { carsByMakeAndModel(make: \"Honda\", model: \"Civic\") { id year ... } }` |\n| `bookingsByDate`        | Retrieve bookings made on a specific date.                       | `query { bookingsByDate(date: \"2023-09-15\") { id user { name } car { make model } ... } }` |\n| `earliestBooking`       | Fetch the earliest booking made by a user.                       | `query { earliestBooking(userId: 24) { id car { make model } pickupDate returnDate ... } }` |\n| `bookingsWithUserAndCar`| Get bookings along with their associated user and car details.  | `query { bookingsWithUserAndCar(limit: 5) { id user { name email } car { make model } ... } }` |\n| `carsByYear`            | Retrieve cars based on a specific manufacturing year.             | `query { carsByYear(year: 2022) { id make model ... } }` |\n| `bookingDetails`        | Fetch detailed information about a specific booking.             | `query { bookingDetails(id: 27) { id user { name email } car { make model } pickupDate returnDate ... } }` |\n| `userByEmail`           | Retrieve user details using their email address.                 | `query { userByEmail(email: \"jane@example.com\") { id name ... } }` |\n| `mostBookedCar`         | Get the car that has been booked the most.                       | `query { mostBookedCar { id make model bookingCount ... } }` |\n| `carsByPriceRange`      | Search for cars within a specific price range.                   | `query { carsByPriceRange(minPrice: 500, maxPrice: 1000) { id make model price ... } }` |\n| `bookingsInMonth`       | Retrieve bookings made within a specific month.                  | `query { bookingsInMonth(year: 2023, month: 8) { id user { name } car { make model } ... } }` |\n| `userBookedCars`        | Fetch a list of cars that a user has booked.                     | `query { userBookedCars(userId: 26) { id make model ... } }` |\n| `carCategoryDetails`    | Get detailed information about a specific car category.           | `query { carCategoryDetails(categoryId: 9) { id name description ... } }` |\n| `bookingRevenue`        | Calculate the total revenue generated from a booking.            | `query { bookingRevenue(id: 29) }` |\n| `averageRatings`        | Get the average ratings for all cars.                            | `query { averageRatings { carId averageRating } }` |\n| `upcomingBookingsByCar` | Fetch upcoming bookings for a specific car.                      | `query { upcomingBookingsByCar(carId: 31) { id user { name } pickupDate returnDate ... } }` |\n| `recentlyBookedUsers`   | Retrieve a list of users who made recent bookings.               | `query { recentlyBookedUsers(limit: 5) { id name ... } }` |\n\n## Examples\n\n![Example](screenshots/08-55-34.png)\n\n![Example](screenshots/09-00-47.png)\n\n![Example](screenshots/09-30-19.png)\n\n![Example](screenshots/09-35-51.png)\n\n![Example](screenshots/10-03-33.png)\n\n![Example](screenshots/10-07-39.png)\n\n![Example](screenshots/10-09-51.png)\n\n![Example](screenshots/10-13-03.png)\n\n![Example](screenshots/18-04-21.png)\n\n![Example](screenshots/18-05-57.png)\n\n![Example](screenshots/18-09-41.png)\n\n![Example](screenshots/18-23-01.png)\n\n![Example](screenshots/18-27-34.png)\n\n![Example](screenshots/18-29-20.png)\n\n![Example](screenshots/18-33-29.png)\n\n![Example](screenshots/19-02-39.png)\n\n![Example](screenshots/19-08-00.png)\n\n![Example](screenshots/19-10-04.png)\n\n![Example](screenshots/19-24-52.png)\n\n![Example](screenshots/19-28-22.png)\n\n![Example](screenshots/19-44-53.png)\n\n![Example](screenshots/19-52-00.png)\n\n![Example](screenshots/19-59-11.png)\n\n![Example](screenshots/20-27-45.png)\n\n![Example](screenshots/20-31-29.png)\n\n![Example](screenshots/20-48-35.png)\n\n![Example](screenshots/20-59-18.png)\n\n![Example](screenshots/21-11-34.png)\n\n![Example](screenshots/21-12-01.png)\n\n![Example](screenshots/21-12-32.png)\n\n![Example](screenshots/21-17-26.png)\n## Database Schema\n\n### Users Table\n- **id**: INTEGER (Primary Key)\n- **name**: STRING\n- **email**: STRING\n- **password**: STRING\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Cars Table\n- **id**: INTEGER (Primary Key)\n- **make**: STRING\n- **model**: STRING\n- **year**: INTEGER\n- **price**: DECIMAL\n- **category_id**: INTEGER (Foreign Key to Car Categories)\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Car Categories Table\n- **id**: INTEGER (Primary Key)\n- **name**: STRING\n- **description**: TEXT\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Bookings Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **pickup_date**: DATE\n- **return_date**: DATE\n- **status**: STRING (e.g., \"pending\", \"confirmed\", \"canceled\")\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Reviews Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **rating**: INTEGER\n- **review_text**: TEXT\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Car Images Table\n- **id**: INTEGER (Primary Key)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **url**: STRING\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Payments Table\n- **id**: INTEGER (Primary Key)\n- **booking_id**: INTEGER (Foreign Key to Bookings)\n- **amount**: DECIMAL\n- **payment_date**: DATE\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Promotions Table\n- **id**: INTEGER (Primary Key)\n- **code**: STRING\n- **discount_percentage**: INTEGER\n- **expiry_date**: DATE\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Addresses Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **street**: STRING\n- **city**: STRING\n- **state**: STRING\n- **country**: STRING\n- **postal_code**: STRING\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### RentalHistories Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **pickup_date**: DATE\n- **return_date**: DATE\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### CarFeatures Table\n- **id**: INTEGER (Primary Key)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **feature**: STRING\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### MaintenanceLogs Table\n- **id**: INTEGER (Primary Key)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **log_date**: DATE\n- **description**: TEXT\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Notifications Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **message**: TEXT\n- **is_read**: BOOLEAN\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Wishlist Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### CarAvailability Table\n- **id**: INTEGER (Primary Key)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **availability_date**: DATE\n- **is_available**: BOOLEAN\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### CarRentals Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **pickup_date**: DATE\n- **return_date**: DATE\n- **total_amount**: DECIMAL\n- **status**: STRING (e.g., \"active\", \"completed\", \"canceled\")\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Ratings Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **rating**: INTEGER\n- **review**: TEXT\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Locations Table\n- **id**: INTEGER (Primary Key)\n- **name**: STRING\n- **address**: TEXT\n- **latitude**: DECIMAL\n- **longitude**: DECIMAL\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### RentalRequests Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **car_category_id**: INTEGER (Foreign Key to Car Categories)\n- **pickup_date**: DATE\n- **return_date**: DATE\n- **status**: STRING (e.g., \"pending\", \"approved\", \"rejected\")\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Feedback Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **subject**: STRING\n- **message**: TEXT\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### InsurancePolicies Table\n- **id**: INTEGER (Primary Key)\n- **name**: STRING\n- **description**: TEXT\n- **coverage_amount**: DECIMAL\n- **premium_amount**: DECIMAL\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### CarIssues Table\n- **id**: INTEGER (Primary Key)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **reported_by**: INTEGER (Foreign Key to Users)\n- **description**: TEXT\n- **status**: STRING (e.g., \"reported\", \"in_progress\", \"resolved\")\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Coupons Table\n- **id**: INTEGER (Primary Key)\n- **code**: STRING\n- **discount_amount**: DECIMAL\n- **valid_from**: DATE\n- **valid_until**: DATE\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### SubscriptionPlans Table\n- **id**: INTEGER (Primary Key)\n- **name**: STRING\n- **description**: TEXT\n- **price**: DECIMAL\n- **features**: TEXT\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### UserSubscriptions Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **plan_id**: INTEGER (Foreign Key to SubscriptionPlans)\n- **start_date**: DATE\n- **end_date**: DATE\n- **status**: STRING (e.g., \"active\", \"canceled\", \"expired\")\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### CarAccessories Table\n- **id**: INTEGER (Primary Key)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **name**: STRING\n- **description**: TEXT\n- **price**: DECIMAL\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### MaintenanceServices Table\n- **id**: INTEGER (Primary Key)\n- **name**: STRING\n- **description**: TEXT\n- **cost**: DECIMAL\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### ServiceRequests Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **service_id**: INTEGER (Foreign Key to MaintenanceServices)\n- **request_date**: DATE\n- **status**: STRING (e.g., \"requested\", \"in_progress\", \"completed\")\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### UserPreferences Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **notification_enabled**: BOOLEAN\n- **newsletter_subscribed**: BOOLEAN\n- **theme**: STRING\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### TripLogs Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **start_date**: DATE\n- **end_date**: DATE\n- **distance_traveled**: DECIMAL\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### FuelLogs Table\n- **id**: INTEGER (Primary Key)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **log_date**: DATE\n- **fuel_amount**: DECIMAL\n- **fuel_price_per_unit**: DECIMAL\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### TrafficViolations Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **car_id**: INTEGER (Foreign Key to Cars)\n- **violation_date**: DATE\n- **description**: TEXT\n- **fine_amount**: DECIMAL\n- **status**: STRING (e.g., \"unpaid\", \"paid\")\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Documents Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **document_type**: STRING\n- **file_url**: STRING\n- **uploaded_at**: TIMESTAMP\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### Transactions Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **amount**: DECIMAL\n- **transaction_date**: DATE\n- **transaction_type**: STRING (e.g., \"payment\", \"refund\")\n- **status**: STRING (e.g., \"completed\", \"pending\")\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n### LoyaltyPoints Table\n- **id**: INTEGER (Primary Key)\n- **user_id**: INTEGER (Foreign Key to Users)\n- **points_balance**: INTEGER\n- **created_at**: TIMESTAMP\n- **updated_at**: TIMESTAMP\n\n## Laravel Tables\n\n### Users Table Migration (create_users_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateUsersTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('users', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('name');\n            $table-\u003estring('email')-\u003eunique();\n            $table-\u003estring('password');\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('users');\n    }\n}\n```\n\n### Cars Table Migration (create_cars_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateCarsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('cars', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('make');\n            $table-\u003estring('model');\n            $table-\u003einteger('year');\n            $table-\u003edecimal('price', 10, 2);\n            $table-\u003eunsignedBigInteger('category_id');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('category_id')-\u003ereferences('id')-\u003eon('car_categories');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('cars');\n    }\n}\n```\n\n### Car Categories Table Migration (create_car_categories_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateCarCategoriesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('car_categories', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('name');\n            $table-\u003etext('description')-\u003enullable();\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('car_categories');\n    }\n}\n```\n\n### Bookings Table Migration (create_bookings_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateBookingsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('bookings', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003edate('pickup_date');\n            $table-\u003edate('return_date');\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('bookings');\n    }\n}\n```\n\n### Reviews Table Migration (create_reviews_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateReviewsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('reviews', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003einteger('rating');\n            $table-\u003etext('review_text');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('reviews');\n    }\n}\n```\n\n### Car Images Table Migration (create_car_images_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateCarImagesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('car_images', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003estring('url');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('car_images');\n    }\n}\n```\n\n### Payments Table Migration (create_payments_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreatePaymentsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('payments', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('booking_id');\n            $table-\u003edecimal('amount', 10, 2);\n            $table-\u003edate('payment_date');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('booking_id')-\u003ereferences('id')-\u003eon('bookings');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('payments');\n    }\n}\n```\n\n### Promotions Table Migration (create_promotions_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreatePromotionsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('promotions', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('code');\n            $table-\u003einteger('discount_percentage');\n            $table-\u003edate('expiry_date');\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('promotions');\n    }\n}\n```\n\n### Addresses Table Migration (create_addresses_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateAddressesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('addresses', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003estring('street');\n            $table-\u003estring('city');\n            $table-\u003estring('state');\n            $table-\u003estring('country');\n            $table-\u003estring('postal_code');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('addresses');\n    }\n}\n```\n\n### RentalHistories Table Migration (create_rental_histories_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateRentalHistoriesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('rental_histories', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003edate('pickup_date');\n            $table-\u003edate('return_date');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('rental_histories');\n    }\n}\n```\n\n### CarFeatures Table Migration (create_car_features_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateCarFeaturesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('car_features', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003estring('feature');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('car_features');\n    }\n}\n```\n\n### MaintenanceLogs Table Migration (create_maintenance_logs_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateMaintenanceLogsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('maintenance_logs', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003edate('log_date');\n            $table-\u003etext('description');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('maintenance_logs');\n    }\n}\n```\n\n### Notifications Table Migration (create_notifications_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateNotificationsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('notifications', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003etext('message');\n            $table-\u003eboolean('is_read')-\u003edefault(false);\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('notifications');\n    }\n}\n```\n\n### Wishlist Table Migration (create_wishlist_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateWishlistTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('wishlist', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('wishlist');\n    }\n}\n```\n\n### CarAvailability Table Migration (create_car_availability_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateCarAvailabilityTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('car_availability', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003edate('availability_date');\n            $table-\u003eboolean('is_available')-\u003edefault(true);\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('car_availability');\n    }\n}\n```\n\n### CarRentals Table Migration (create_car_rentals_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateCarRentalsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('car_rentals', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003edate('pickup_date');\n            $table-\u003edate('return_date');\n            $table-\u003edecimal('total_amount', 10, 2);\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('car_rentals');\n    }\n}\n```\n\n### Ratings Table Migration (create_ratings_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateRatingsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('ratings', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003einteger('rating');\n            $table-\u003etext('review');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('ratings');\n    }\n}\n```\n\n### Locations Table Migration (create_locations_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateLocationsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('locations', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('name');\n            $table-\u003etext('address');\n            $table-\u003edecimal('latitude', 10, 8);\n            $table-\u003edecimal('longitude', 11, 8);\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('locations');\n    }\n}\n```\n\n### RentalRequests Table Migration (create_rental_requests_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateRentalRequestsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('rental_requests', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('car_category_id');\n            $table-\u003edate('pickup_date');\n            $table-\u003edate('return_date');\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('car_category_id')-\u003ereferences('id')-\u003eon('car_categories');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('rental_requests');\n    }\n}\n```\n\n### Feedback Table Migration (create_feedback_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateFeedbackTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('feedback', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003estring('subject');\n            $table-\u003etext('message');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('feedback');\n    }\n}\n```\n\n### InsurancePolicies Table Migration (create_insurance_policies_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateInsurancePoliciesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('insurance_policies', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('name');\n            $table-\u003etext('description');\n            $table-\u003edecimal('coverage_amount', 10, 2);\n            $table-\u003edecimal('premium_amount', 10, 2);\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('insurance_policies');\n    }\n}\n```\n\n### CarIssues Table Migration (create_car_issues_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateCarIssuesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('car_issues', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003eunsignedBigInteger('reported_by');\n            $table-\u003etext('description');\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n            $table-\u003eforeign('reported_by')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('car_issues');\n    }\n}\n```\n\n### Coupons Table Migration (create_coupons_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateCouponsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('coupons', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('code')-\u003eunique();\n            $table-\u003edecimal('discount_amount', 10, 2);\n            $table-\u003edate('valid_from');\n            $table-\u003edate('valid_until');\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('coupons');\n    }\n}\n```\n\n### SubscriptionPlans Table Migration (create_subscription_plans_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateSubscriptionPlansTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('subscription_plans', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('name');\n            $table-\u003etext('description');\n            $table-\u003edecimal('price', 10, 2);\n            $table-\u003etext('features');\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('subscription_plans');\n    }\n}\n```\n\n### UserSubscriptions Table Migration (create_user_subscriptions_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateUserSubscriptionsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('user_subscriptions', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('plan_id');\n            $table-\u003edate('start_date');\n            $table-\u003edate('end_date');\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('plan_id')-\u003ereferences('id')-\u003eon('subscription_plans');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('user_subscriptions');\n    }\n}\n```\n\n### CarAccessories Table Migration (create_car_accessories_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateCarAccessoriesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('car_accessories', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003estring('name');\n            $table-\u003etext('description');\n            $table-\u003edecimal('price', 10, 2);\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('car_accessories');\n    }\n}\n```\n\n### MaintenanceServices Table Migration (create_maintenance_services_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateMaintenanceServicesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('maintenance_services', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('name');\n            $table-\u003etext('description');\n            $table-\u003edecimal('cost', 10, 2);\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('maintenance_services');\n    }\n}\n```\n\n### ServiceRequests Table Migration (create_service_requests_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateServiceRequestsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('service_requests', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('service_id');\n            $table-\u003edate('request_date');\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('service_id')-\u003ereferences('id')-\u003eon('maintenance_services');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('service_requests');\n    }\n}\n```\n\n### UserPreferences Table Migration (create_user_preferences_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateUserPreferencesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('user_preferences', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eboolean('notification_enabled')-\u003edefault(true);\n            $table-\u003eboolean('newsletter_subscribed')-\u003edefault(false);\n            $table-\u003estring('theme')-\u003edefault('light');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('user_preferences');\n    }\n}\n```\n\n### TripLogs Table Migration (create_trip_logs_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateTripLogsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('trip_logs', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003edate('start_date');\n            $table-\u003edate('end_date');\n            $table-\u003edecimal('distance_traveled', 10, 2);\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('trip_logs');\n    }\n}\n```\n\n## FuelLogs Table Migration (create_fuel_logs_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateFuelLogsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('fuel_logs', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003edate('log_date');\n            $table-\u003edecimal('fuel_amount', 10, 2);\n            $table-\u003edecimal('fuel_price_per_unit', 10, 2);\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('fuel_logs');\n    }\n}\n```\n\n### TrafficViolations Table Migration (create_traffic_violations_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateTrafficViolationsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('traffic_violations', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003edate('violation_date');\n            $table-\u003etext('description');\n            $table-\u003edecimal('fine_amount', 10, 2);\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('traffic_violations');\n    }\n}\n```\n\n### Documents Table Migration (create_documents_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateDocumentsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('documents', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003estring('document_type');\n            $table-\u003estring('file_url');\n            $table-\u003etimestamp('uploaded_at');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('documents');\n    }\n}\n```\n\n### Transactions Table Migration (create_transactions_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateTransactionsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('transactions', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003edecimal('amount', 10, 2);\n            $table-\u003edate('transaction_date');\n            $table-\u003estring('transaction_type');\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('transactions');\n    }\n}\n```\n\n### LoyaltyPoints Table Migration (create_loyalty_points_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateLoyaltyPointsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('loyalty_points', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003einteger('points_balance');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('loyalty_points');\n    }\n}\n```\n\n### CarAccessories Table Migration (create_car_accessories_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateCarAccessoriesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('car_accessories', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003estring('name');\n            $table-\u003etext('description');\n            $table-\u003edecimal('price', 10, 2);\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('car_accessories');\n    }\n}\n```\n\n### MaintenanceLogs Table Migration (create_maintenance_logs_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateMaintenanceLogsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('maintenance_logs', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003edate('log_date');\n            $table-\u003etext('description');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('maintenance_logs');\n    }\n}\n```\n\n### CarIssues Table Migration (create_car_issues_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateCarIssuesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('car_issues', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003eunsignedBigInteger('reported_by');\n            $table-\u003etext('description');\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n            $table-\u003eforeign('reported_by')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('car_issues');\n    }\n}\n```\n\n### Coupons Table Migration (create_coupons_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateCouponsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('coupons', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('code');\n            $table-\u003edecimal('discount_amount', 10, 2);\n            $table-\u003edate('valid_from');\n            $table-\u003edate('valid_until');\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('coupons');\n    }\n}\n```\n\n### SubscriptionPlans Table Migration (create_subscription_plans_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateSubscriptionPlansTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('subscription_plans', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('name');\n            $table-\u003etext('description');\n            $table-\u003edecimal('price', 10, 2);\n            $table-\u003etext('features');\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('subscription_plans');\n    }\n}\n```\n\n### UserSubscriptions Table Migration (create_user_subscriptions_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateUserSubscriptionsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('user_subscriptions', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('plan_id');\n            $table-\u003edate('start_date');\n            $table-\u003edate('end_date');\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('plan_id')-\u003ereferences('id')-\u003eon('subscription_plans');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('user_subscriptions');\n    }\n}\n```\n\n### MaintenanceServices Table Migration (create_maintenance_services_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateMaintenanceServicesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('maintenance_services', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('name');\n            $table-\u003etext('description');\n            $table-\u003edecimal('cost', 10, 2);\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('maintenance_services');\n    }\n}\n```\n\n### ServiceRequests Table Migration (create_service_requests_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateServiceRequestsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('service_requests', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('service_id');\n            $table-\u003edate('request_date');\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('service_id')-\u003ereferences('id')-\u003eon('maintenance_services');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('service_requests');\n    }\n}\n```\n\n### UserPreferences Table Migration (create_user_preferences_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateUserPreferencesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('user_preferences', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eboolean('notification_enabled');\n            $table-\u003eboolean('newsletter_subscribed');\n            $table-\u003estring('theme');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('user_preferences');\n    }\n}\n```\n\n### TripLogs Table Migration (create_trip_logs_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateTripLogsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('trip_logs', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003edate('start_date');\n            $table-\u003edate('end_date');\n            $table-\u003edecimal('distance_traveled', 10, 2);\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('trip_logs');\n    }\n}\n```\n\n### FuelLogs Table Migration (create_fuel_logs_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateFuelLogsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('fuel_logs', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003edate('log_date');\n            $table-\u003edecimal('fuel_amount', 10, 2);\n            $table-\u003edecimal('fuel_price_per_unit', 10, 2);\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('fuel_logs');\n    }\n}\n```\n\n### TrafficViolations Table Migration (create_traffic_violations_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateTrafficViolationsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('traffic_violations', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003eunsignedBigInteger('car_id');\n            $table-\u003edate('violation_date');\n            $table-\u003etext('description');\n            $table-\u003edecimal('fine_amount', 10, 2);\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n            $table-\u003eforeign('car_id')-\u003ereferences('id')-\u003eon('cars');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('traffic_violations');\n    }\n}\n```\n\n### Documents Table Migration (create_documents_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateDocumentsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('documents', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003estring('document_type');\n            $table-\u003estring('file_url');\n            $table-\u003etimestamp('uploaded_at');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('documents');\n    }\n}\n```\n\n### Transactions Table Migration (create_transactions_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateTransactionsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('transactions', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003edecimal('amount', 10, 2);\n            $table-\u003edate('transaction_date');\n            $table-\u003estring('transaction_type');\n            $table-\u003estring('status');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('transactions');\n    }\n}\n```\n\n### LoyaltyPoints Table Migration (create_loyalty_points_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateLoyaltyPointsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('loyalty_points', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003eunsignedBigInteger('user_id');\n            $table-\u003einteger('points_balance');\n            $table-\u003etimestamps();\n\n            $table-\u003eforeign('user_id')-\u003ereferences('id')-\u003eon('users');\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('loyalty_points');\n    }\n}\n```\n\n### Employee Table Migration (create_employees_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateEmployeesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('employees', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('first_name');\n            $table-\u003estring('last_name');\n            $table-\u003estring('email')-\u003eunique();\n            $table-\u003estring('phone')-\u003enullable();\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('employees');\n    }\n}\n```\n\n### EmployeeRoles Table Migration (create_employee_roles_table.php):\n\n```php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateEmployeeRolesTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('employee_roles', function (Blueprint $table) {\n            $table-\u003eid();\n            $table-\u003estring('role_name');\n            $table-\u003etimestamps();\n        });\n    }\n\n    public function down()\n    {\n        Schema::dropIfExists('employee_roles');\n    }\n}\n```\n\nAdjust the files according to your project's needs, relationships, and any additional columns you might require. After creating the migrations, run `php artisan migrate` to apply them to your database.\n\n## GraphQL Structure\n\n```graphql\ntype User {\n  id: Int!\n  name: String!\n  email: String!\n  password: String!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype Car {\n  id: Int!\n  make: String!\n  model: String!\n  year: Int!\n  price: Float!\n  category: CarCategory!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype CarCategory {\n  id: Int!\n  name: String!\n  description: String!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype Booking {\n  id: Int!\n  user: User!\n  car: Car!\n  pickup_date: Date!\n  return_date: Date!\n  status: String!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype Review {\n  id: Int!\n  user: User!\n  car: Car!\n  rating: Int!\n  review_text: String!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype CarImage {\n  id: Int!\n  car: Car!\n  url: String!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype Payment {\n  id: Int!\n  booking: Booking!\n  amount: Float!\n  payment_date: Date!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype Promotion {\n  id: Int!\n  code: String!\n  discount_percentage: Int!\n  expiry_date: Date!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype Address {\n  id: Int!\n  user: User!\n  street: String!\n  city: String!\n  state: String!\n  country: String!\n  postal_code: String!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype RentalHistory {\n  id: Int!\n  user: User!\n  car: Car!\n  pickup_date: Date!\n  return_date: Date!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype CarFeature {\n  id: Int!\n  car: Car!\n  feature: String!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype MaintenanceLog {\n  id: Int!\n  car: Car!\n  log_date: Date!\n  description: String!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype Notification {\n  id: Int!\n  user: User!\n  message: String!\n  is_read: Boolean!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype Wishlist {\n  id: Int!\n  user: User!\n  car: Car!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype CarAvailability {\n  id: Int!\n  car: Car!\n  availability_date: Date!\n  is_available: Boolean!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype CarRental {\n  id: Int!\n  user: User!\n  car: Car!\n  pickup_date: Date!\n  return_date: Date!\n  total_amount: Float!\n  status: String!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype Rating {\n  id: Int!\n  user: User!\n  car: Car!\n  rating: Int!\n  review: String!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\ntype Location {\n  id: Int!\n  name: String!\n  address: String!\n  latitude: Float!\n  longitude: Float!\n  created_at: DateTime!\n  updated_at: DateTime!\n}\n\n# Define the remaining types for the rest of the tables similarly...\n\ntype Query {\n  # Add your query fields here...\n}\n\ntype Mutation {\n  # Add your mutation fields here...\n}\n```\n\n## Caching with Redis\n\nRedis caching is implemented to enhance the performance of CruiseGraphQL. Frequently accessed data, such as car details and availability status, are cached to minimize database queries and improve response times.\n\n## License\n\nCruiseGraphQL is open-source software licensed under the GPL-3.0 License.\n\n## Acknowledgments\n\nWe extend our gratitude to the Laravel community for providing an exceptional framework for web application development.\n\nCopyright 2023, Max Base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fcruiselaravelgraphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fcruiselaravelgraphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fcruiselaravelgraphql/lists"}