Category : vue.js

my code is two step first step i selecting data from datatable second step if i selected data with same group_id should be giving error. but i did not do. please help me. $(document).ready(function () { $(‘#productTable tbody’).on(‘click’, ‘tr’, function () { $(this).toggleClass(‘selected’); $(this).find(‘input[type=”checkbox”]’).prop(‘checked’, $(this).hasClass(‘selected’)); }); }); // goCustomerStep() { var table= $(‘#productTable’).DataTable(); // Valid ..

Read more

Im following this YT tutorial, I followed the steps but it seems that the ExampleComponent does not show. The App.vue shows but not the route. Here are my code: app.js import Vue from ‘vue’; import router from ‘./router’; import App from ‘./components/App’; require(‘./bootstrap’); const app = new Vue({ el: ‘#app’, components: { App }, router, ..

Read more

Im following this YT tutorial, I followed the steps but it seems that the ExampleComponent does not show. The App.vue shows but not the route. Here are my code: app.js import Vue from ‘vue’; import router from ‘./router’; import App from ‘./components/App’; require(‘./bootstrap’); const app = new Vue({ el: ‘#app’, components: { App }, router, ..

Read more

I’ve made a Laravel SPA application with Vue and Laravel Sanctum, but every time I do a POST request with axios I get a 419 error code (CSRF code mismatch). My bootstrap.js window._ = require(‘lodash’); window.axios = require(‘axios’); window.axios.defaults.withCredentials = true; window.axios.defaults.headers.common = { ‘X-Requested-With’: ‘XMLHttpRequest’, ‘X-CSRF-TOKEN’: document.querySelector(‘meta[name="csrf-token"]’).getAttribute(‘content’), }; axios.get(‘/sanctum/csrf-cookie’).then(response => { console.log(response); axios.post(‘/api/auth/login’, this.fields).then(response ..

Read more

Here is the click event of Manage Category. Here is the remove method that’s method working in Vue js code. <button type="button" class="btn btn-danger btn-sm" @click="remove(category.id)">Delete</button> Vue JS code is here Here is a method of remove. When I deleted data it’s show notification. <script> export default { name: "manage", mounted() { this.$store.dispatch("getCategories"); }, computed:{ ..

Read more

my code What I want My query in my controller public function show($id) { $structural = DB::table(‘attendance’)->where(‘payroll_daily_id’,$id) ->where(‘assignment’,’STRUCTURAL’) ->select(‘payroll_daily_attendance.*’) ->get(); $fetch = []; foreach($structural as $key){ if(!isset($fetch[$key->wrk_id][‘total_ot’]) && !isset($fetch[$key->wrk_id][‘total_days’]) ){ $fetch[$key->wrk_id][‘total_ot’] = 0; $fetch[$key->wrk_id][‘total_days’] = 0; } $fetch[$key->wrk_id][‘wrk_id’] = $key->wrk_id; $fetch[$key->wrk_id][‘daily_rate’] = $key->rate; $fetch[$key->wrk_id][‘date’][$key->date][‘work_hours’] = $key->reg_hour; $fetch[$key->wrk_id][‘date’][$key->date][‘adj_hour’] = $key->adj_hour; $fetch[$key->wrk_id][‘total_ot’] += $key->ot_adj; $fetch[$key->wrk_id][‘total_days’] += $key->reg_hour; ..

Read more

Hey there im working on a laravel project, also using vue js and i get his error on my console and i dont know how to fix it. the error on console continues like this: at baseSetAttr (http://localhost:8000/js/app.js:44393:8) at setAttr (http://localhost:8000/js/app.js:44368:5) at Array.updateAttrs (http://localhost:8000/js/app.js:44323:7) at invokeCreateHooks (http://localhost:8000/js/app.js:43679:22) at createElm (http://localhost:8000/js/app.js:43566:11) at createChildren (http://localhost:8000/js/app.js:43663:9) at createElm ..

Read more

I am trying to use bootstrap collapse (https://getbootstrap.com/docs/4.1/components/collapse/) in v-for div… My question is: How to open just one div that was clicked, not all divs? (Problem is that when I click one button, all the divs are opening, so I tried v-bind:id="status.id", but something is not good…) My code is here: <template> <div class="container ..

Read more

I’m sending this data to the view part that is written in view but isn’t displayed, do you think? $itemsCount = DB::table(‘items’) ->groupBy(‘level_id’) ->selectRaw(‘level_id, count(*) as type’); $ItemsMdCount = DB::table(‘items’) ->groupBy(‘project_model_id’) ->selectRaw(‘project_model_id, count(*) as type’); return view(‘project.view’, compact(‘users’, ‘itemsCount’, ‘itemsMdCount’)); And in vue I make the display {{ itemsCount }} How can I send the ..

Read more