This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // on hittig note on domain one gets redirected to the note.index.blade.php. | |
| Route::get('/note', function() { | |
| return view('note.index'); | |
| })->name('note'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lets assume we have a laptop.. | |
| name => fx400 | |
| id of attribute in bracket | |
| attributes => color(1), RAM(2), touchable screen(3) | |
| id of attribute value in bracket | |
| attribute value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| i have one product.. | |
| for eg.. apache.. | |
| apache has three attributes.. | |
| attributes => 1) color 2) brakes 3) ABS | |
| value of attributes.. | |
| color => 1) red 2) white | |
| brakes => 1) disc 2) drum | |
| ABS => 1) Yes 2) No |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="note-form"> | |
| <div class="component-header">Create A new Note</div> | |
| <form @submit.prevent="add"> | |
| <input v-model="title"> | |
| <button type="submit">Create</button> | |
| </form> | |
| </div> | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div> | |
| <ul class="list-group center"> | |
| <div class="component-header">Notes({{ notesLength }})</div> | |
| <li v-for="(note, index) in notes" class="list-group-item" v-if="notesLength"> | |
| <div class="row"> | |
| <div class="col-sm-7"> | |
| <span v-if="currentEditingId !== note.id">{{ note.title }}</span> | |
| <input type="text" v-if="currentEditingId === note.id && editing" :placeholder="note.title" | |
| v-model="editedTitle"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Vue from 'vue'; | |
| import VueRouter from 'vue-router'; | |
| import NoteApp from './components/NoteApp.vue'; | |
| import routes from './routes'; | |
| import notesStore from './store/notesStore'; | |
| Vue.use(VueRouter); | |
| const router = new VueRouter({ | |
| routes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import CreateNote from './components/CreateNote.vue' | |
| import List from './components/List.vue' | |
| import FavouriteList from './components/FavouriteList.vue' | |
| const routes = [ | |
| { path: '/', component: List }, | |
| { path: '/create', component: CreateNote }, | |
| { path: '/list', component: List }, | |
| { path: '/favourite-list', component: FavouriteList }, | |
| { path: '*', redirect: '/list' }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Vue from 'vue'; | |
| import Vuex from 'vuex'; | |
| import axios from 'axios'; | |
| import notes from '../api'; | |
| Vue.use(Vuex); | |
| const notesStore = new Vuex.Store({ | |
| state: { | |
| notes: [], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const notes = '/api/notes'; | |
| export default notes; |