Adddress Book Laravue README
This app is designed to showcase my abilities using php, laravel, and vuejs to create and store contacts and their related addresses to a database. Eventually, it will also include the ability for each user to have their own personalized address book.
Requirements
- Must allow the user to create, edit and delete contacts
- Must allow the user to create, edit and delete addressess related to the correct contact
- Deleting a contact deletes all associated addressess
- Deleting an address only affects that address
- User friendly and intuitive userface
- User friendly algolia instant-search
Installation
Installing the app:
- clone the Git repo
- run composer update
- Run npm install && npm run dev
- run php artisan migrate --seed
- run php artisan serve
Dependancies
- npm install vue
- npm install vue-router
- npm install carbon
- npm install view-design --save
- npm install --save vue-instantsearch
File Structure
All files are located in the resources/js/ folder
- Pages
- Contacts
- index.vue => loads the contacts list with action buttons
- data: contact.id, contact.firstName, contact.lastName, contact.email, contact.phone, contact. birthday
- createContact.vue => loads a form for adding a new contact
- editContact.vue => loads a form with current contact data and saves any changes
- data: contact.id, contact.firstName, contact.lastName, contact.email, contact.phone, contact. birthday
- deleteContact.vue => first ask for confirmation then deletes a contact and all of the associated addresses
- data: contact.id, contact.firstName, contact.lastName, contact.email, contact.phone, contact. birthday
- Addresses
- index.vue => loads the current contact data and addresses
- data: contact.id, contact.firstName, contact.lastName, contact.email, contact.phone, contact. birthday, contact.address (all address data where the address contact.id foreign key is the same as the current contact id)
- createAddress.vue => form for creating a new address under the current contact
- editAddress.vue => form with current contact data and saves any changes
- deleteAddress.vue => asks for confirmation and then deletes the address data
- Future Updates
- Login with authentication
- personal user dashboard and address book
- Routes
- vue routes are stored in router.js
- All AJAX routes are stored in commonajax.js
- Both have all routes named the same as the web page with the acception of address/index.vue which is called as ‘details’
- Database
- This uses a mysql database (please ensure to update the .env file with your database information)
- Two tables
- Contacts
- fields
- firstName str
- lastName str
- email str
- phone str
- birthday date yyyy-mm-dd
- Addresses
- fields
- number int
- street str
- city str
- state str
- zip int
- contact_id (foreign key to the contact table)
Known Issues
Future work
- Add user authentication
- Add personal address books
Release Notes
1.0.0
unreleased
Contact us
Carlos Aragon
Download Details:
Author: Truslide12
Source Code: https://github.com/Truslide12/Addressbook-lv
#vue #vuejs #javascript