Task Description:
You are required to create a web application using Laravel (latest version), Bootstrap, and jQuery that incorporates the following features: dynamic form registration, user login, Google Autocomplete for address input, PostgreSQL database usage with foreign key relations, and address storage with latitude and longitude using geometry types.
Requirements:
-
User Registration:
- Implement a dynamic registration form using Laravel's built-in form handling and validation.
- Generate the registration form dynamically based on a JSON data structure.
- The form should include fields for first name, last name, email, password, and confirm password.
- Perform client-side and server-side validation to ensure all required fields are filled, email is valid, and passwords match.
- Store the user details in the users table in the PostgreSQL database.
-
User Login:
- Implement a standard user login functionality using Laravel's authentication system.
- Users should be able to log in using their registered email and password.
- Implement necessary authentication middleware to protect routes and allow only authenticated users to access certain pages and features.
-
Google Autocomplete for Address Input:
- Integrate the Google Autocomplete API into the address input field.
- Allow users to search for an address and select from the suggested options.
- Retrieve the selected address details, including latitude and longitude, from the Google Autocomplete API.
- Store the address details, including all relevant parts (street, city, state, etc.), in the address table in the PostgreSQL database.
- Utilize the geometry type column in the address table to store the latitude and longitude values (Optional).
-
PostgreSQL Database:
- Use PostgreSQL as the database for the application.
- Create necessary database tables, including users and addresses.
- Establish foreign key relations between the users table and the addresses table so that if a user is deleted, all corresponding addresses are also deleted.
-
Additional Features (Optional):
- Implement a user dashboard that displays the user's registered addresses.
- Allow users to add, edit, and delete their addresses.
- Implement pagination to display a limited number of addresses per page.
- Implement search functionality to allow users to search for specific addresses based on certain criteria.
-
UI Design:
- Utilize Bootstrap and jQuery to design and style the user interface of the application.
- Ensure the application is responsive and visually appealing.
Note: Make sure to follow Laravel's best practices, adhere to the MVC (Model-View-Controller) pattern, and use Laravel's Eloquent ORM for database interaction. Document your code and provide any necessary instructions for running the application.