Topic: VueJs

Vue js Toggle switch Update DB field using Ajax 0

Vue js Toggle switch Update DB field using Ajax

Today, We want to share with you Vue js Toggle switch Update DB field using Ajax.In this post we will show you Toggle Switches Laravel, Ajax and jQuery example, hear for Laravel Bootstrap Toggle switch Update DB field using Ajax
we will give you demo and example for implement.In this post, we will learn about Bootstrap Toggle Inside JQuery DataTable with an example.

Vue js Toggle switch Update DB field using Ajax

There are the Following The simple About Vue js Toggle switch Update DB field using Ajax Full Information With Example and source code.

As I will cover this Post with live Working example to develop Laravel 5.7 Toggle switch Update DB field using Ajax, so the Vue js Toggle Like Dislike Rating System using jQuery Ajax for this example is following below.

Step 1: Make a Vue JS App

In this step, I want to make vue cli app using bellow simple command:

vue create vueSwitch

Step 2: Install vue-js-toggle-button package

Now I want to install simple step by step vue-js-toggle-button npm package for vue js Bootstrap Toggle switch Update DB field using Ajax.

npm install vue-js-toggle-button --save

Step 3: Use vue-js-toggle-button

I want to use vue-js-toggle-button package in main.js file of vue js app.

src/main.js

import Vue from 'vue'
import App from './App.vue'
import ToggleButton from 'vue-js-toggle-button'
Vue.config.productionTip = false
Vue.use(ToggleButton)
new Vue({
  render: h => h(App),

}).$mount('#app')

Step 4: Update App.vue File

In this step, I want to update app.vue file, because i updated simple component therefor.

src/App.vue

<template>
  <div id="app">
    <Product></Product>
  </div>
</template>
<script>
import Product from './components/Product.vue'
export default {
  name: 'app',
  components: {
    Product
  }
}
</script>
[/php

<h3>Step 5: Create Product Component</h3>
<p>Here, we will create Product.vue component with following source code.</p>
<b>src/components/Product.vue</b>
[php]
<template>
  <div class="container pakainfo" style="text-align:center">
    <div class="large-12 medium-12 small-12 cell">
      <h1 style="font-family:arial">Vue js toggle button example - Infinityknow.com</h1>
  
        <toggle-button @change="onChangeEventHandler" :labels="{checked: 'On', unchecked: 'Off'}" style="margin-left: 20px" />
  
        <toggle-button :labels="{checked: 'Infinityknow.com', unchecked: 'pakainfo.com'}" width="250" style="margin-left: 20px" />
  
        <toggle-button :labels="{checked: 'Yes', unchecked: 'No'}" style="margin-left: 20px" />
  
    </div>
  </div>
</template>
<script>
  export default {
    data(){
      return {
        file: ''
      }
    },
  
    methods: {
      onChangeEventHandler(){
          alert('Welcome To Pakainfo.com Shop website');
      }
    }
  }
</script>

Last step, I can run vue js live app by using following simple below command:

npm run serve

Get more info for Toggle Switches Laravel, Ajax and vuejs example from here: https://www.npmjs.com/package/vue-js-toggle-button.

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Vue js Toggle switch Update DB field using Ajax.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Vue Tabs Components vue-nav-tabs 0

Vue Tabs Components vue-nav-tabs

Vue Tabs Components vue-nav-tabs

In this Post We Will Explain About is Vue Tabs Components vue-nav-tabs With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Vuejs tab navigation Example

In this post we will show you Best way to implement Vuejs material tabs, hear for Vuejs bootstrap tabs and Vuejs tab routing with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Vue.js Tabs tutorial using Components

Simplified, very customizable bootstrap based tabs using Vue-tabs is a tab simple component which simplifies more the usage of vue tabs and their some customizationvue-nav-tabs

npm install vue-nav-tabs

Vue-tabsTabs is an some extension of navs, to make tabbable panes of local data content, even via simple dropdown menus.

Include external Js libs

bootstrap.min.css
vue.js
bootstrap.min.js

index.html File

     <h3>{{tab.name}}</h3>
		<h4>Pakainfo.com</h4>


<div id="live_tab_examples">
    <ul class="nav nav-live_tabs" role="tablist">
        <li role="presentation">
            <a href="#" role="tab">{{ tab.name }}</a>

        </li>
        <li>
            <button type="button" class="btn btn-success">New tab</button>
        </li>
    </ul>
    <div class="tab-content">
        <div role="tabpanel" class="tab-pane">
            
        </div>
    </div>
<pre>{{ $data | json }}</pre>

</div>

Javacript files

Vue.component('query-browser-tab', {
    template: '#queryBrowserTab',
    data: function () {
        return {
            databaseOptions: [],
        };
    },
    props: ['tab'],

    methods: {},

});

new Vue({
    el: '#live_tab_examples',
    data: {
        live_tabs: [{
            name: "tab1",
            id : 0,
            tab_active: true
        }],
        current_tab: {}
    },
    ready: function () {
		this.tab_set_act(this.live_tabs[0]);
    },

    methods: {
        tab_set_act: function (tab) {
            var self = this;
            tab.tab_active = true;
            this.current_tab = tab;
            /*Pakainfo.com this.current_tab.tab_active = true;
            console.log("current_tab name=" + this.current_tab.name);*/
            this.live_tabs.forEach(function (tab) {
                console.log("TAB => " + tab);
                console.log("current_tab id => " + self.current_tab.id);
                console.log("tab id=" + tab.id);

                if (tab.id !== self.current_tab.id) { tab.tab_active = false;}
            });
        },
        Tab_new: function () {
            add_newtab = {
                name: "tab" + (this.live_tabs.length + 1),
                id: this.live_tabs.length,
                tab_active: true
            };
            this.live_tabs.push(add_newtab);
            this.tab_set_act(add_newtab);
            /*Pakainfo.com this.current_tab = add_newtab;

            console.log("###Pakainfo.com newtab name=" + add_newtab.name);*/

        },

        closeTab: function () {
            console.log("###Pakainfo.com CLOSE!");
        }
    }
});

Example

I hope you have Got What is Vuejs material tabs example And how it works.I would Like to have FeadBack From My Blog(Pakainfo.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.

Vue JS Datepicker Examples with Demo 0

Vue JS Datepicker Examples with Demo

Today, We want to share with you Vue JS Datepicker Examples with Demo.In this post we will show you Bootstrap Examples vuejs datepicker, hear for vue JS enabling/disabling datepicker we will give you demo and example for implement.In this post, we will learn about VueJS Datepicker for Bootstrap and Material Design with an example.

Vue JS Datepicker Examples with Demo

There are the Following The simple About Vue JS Datepicker Examples with Demo Full Information With Example and source code.

As I will cover this Post with live Working example to develop Vue JS Datepicker Widget, so the Vue DatePicker Component for this example is following below.

Step 1: HTML Part

index.html

<script src="https://unpkg.com/flatpickr"></script>
<h3>VueJS Datepicker Examples - Pakainfo.com</h3>
<div id="live_datepicker">
  <div class="ui form">
    <datepicker v-model="date"></datepicker>
  </div>
</div>

<template id="datepicker">
  <div ref="date" class="ui left action input">
    <button class="ui icon button" data-toggle>
      <i class="calendar icon"></i>
    </button>
    <input type="text" :name="name" :placeholder="placeholder" :readonly="readonly" @change="$emit('input', $event.target.value)" data-input/>
    <button class="ui inverted icon button" :disabled="!value" data-clear>
      <i class="remove red icon"></i>
    </button>
  </div>
</template>

Step 2: Include CDN(vuejs datepicker cdn)

Include Vuejs and datepicker CSS and Scripts libs Like vuejs datepicker style, vuejs datepicker cdn.

<script src="https://unpkg.com/flatpickr"></script>
@import url('https://unpkg.com/[email protected]/semantic.css');
@import url('https://unpkg.com/flatpickr/dist/flatpickr.min.css');

Step 3: Add a JavaScript Source Code

Include Vuejs and datepicker CSS and Scripts source code

Vue.component('datepicker', {
	name: 'datepicker',
  template: '#datepicker', //vuejs template
  props: {
    name: String,
    value: {
      require: true
    },
    placeholder: String,
    readonly: Boolean
  },
  //current date get
  date() {
    return {
      datepicker: null
    }
  },
  mounted() {
    if (!this.datepicker) {
      this.datepicker = flatpickr('.ui.input', {
        wrap: true
      })
    }
  },
  destroyed() {
    this.datepicker.destroy()
    this.datepicker = null
  }
})

new Vue({
	el: '#live_datepicker',
  data() {
  	return {
    	date: null
    }
  },
  watch: {
  	date() {
    	console.log(this.date)
    }
  }
})

Simple UI VueJS DatePicker Demo
Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Vue JS Datepicker Examples with Demo.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Vuejs Live Search Filter Example with Demo 0

Vuejs Live Search Filter Example with Demo

Today, We want to share with you Vuejs Live Search Filter Example with Demo.In this post we will show you Instant AJAX Search with Laravel and Vue, hear for Setup a PHP and AJAX Live Search Box using Vuejs we will give you demo and example for implement.In this post, we will learn about vuejs Search, sort, filters, flexibility to tables, list and more! with an example.

Vuejs Live Search Filter Example with Demo

There are the Following The simple About Vuejs Live Search Filter Example with Demo Full Information With Example and source code.

As I will cover this Post with live Working example to develop Live Text Search And Filter Using Vuejs, so the some vuejs Ajax Search Box in Laravel and MySQL for this example is following below.

Step 1: Main HTML Interface

index.html

<h1>vuejs Ajax Search Box in Laravel and MySQL</h1>
<div id="app">
  <div class="pakainfo search-wrapper">
    <input type="text" v-model="search" placeholder="Find Clients title.."/>
        <label>Find title:</label>
  </div>
  <div class="wrapper">
    <div class="card" v-for="profile in clientsList">
      <a v-bind:href="profile.link" target="_blank">
        <img v-bind:src="profile.img"/>
        <small>profileed by: {{ profile.refrences }}</small>
        {{ profile.title }}
      </a>
    </div>
  </div>
</div>

Step 2: Main js file

index.js

class Profile {
  constructor(title, link, refrences, img) {
    this.title = title;
    this.link = link;
    this.refrences = refrences;
    this.img = img;
  }
}

const app = new Vue ({
  el: '#app',
  data: {
    search: '',
    clientProfileList : [
      new Profile(
        'Jaydeep Gondaliya', 
        'https://pakainfo.com/laravel-integrate-ckeditor-example-tutorial/', 
        'Top 10 Advanced Laravel Interview Questions Answers', 
        'https://pakainfo.com/top-10-advanced-laravel-interview-questions-answers/'
      ),
      new Profile(
        'Krunal Sisodariya', 
        'https://pakainfo.com/laravel-union-query-builder-example/', 
        'Multiple Database Connections using Laravel',
        'https://pakainfo.com/multiple-database-connections-using-laravel/'
      ),
      new Profile(
        'chirag Dethariya', 
        'https://pakainfo.com/email-verification-laravel-5-7/', 
        'Simple Pagination with Laravel and MySQl', 
        'https://pakainfo.com/simple-pagination-with-laravel-and-mysql/'
      ),
      new Profile(
        'Dave dhaval', 
        'https://pakainfo.com/laravel-json-array-merge/', 
        'Laravel 5.7 Datatables Tutorial With Example',
        'https://pakainfo.com/laravel-5-7-datatables-tutorial-example/'
      ),
      new Profile(
        'Ankit Kathiriya', 
        'https://pakainfo.com/laravel-5-7-crud-tutorial-example/', 
        'Laravel 5.7 JQuery AJAX Tutorial Example', 
        'https://pakainfo.com/laravel-5-7-jquery-ajax-tutorial-example/'
      ),
      new Profile(
        'Hardik Talpada', 
        'https://pakainfo.com/laravel-5-6-share-variable/', 
        'Laravel 5.7 Get Current Page URL path',
        'https://pakainfo.com/laravel-5-7-get-current-page-url-path/'
      ),
      new Profile(
        'Viajy Bhanderi', 
        'https://pakainfo.com/laravel-soft-delete/', 
        'Laravel 5.7 REST API Tutorial Example Steps',
        'https://pakainfo.com/laravel-5-7-rest-api-tutorial-example-steps/'
      ),
      new Profile(
        'Astha Gondaliya', 
        'https://pakainfo.com/laravel-clear-cache/', 
        'Get Current User ID from Mysql in Laravel', 
        'https://pakainfo.com/get-current-user-id-from-mysql-in-laravel/'
      ),
      new Profile(
        'Rahul Mehata', 
        'https://pakainfo.com/laravel-last-inserted-id/', 
        'Laravel Email Verification Script Example',
        'https://pakainfo.com/laravel-email-verification-script-example/'
      ),
]
  },
  computed: {
    clientsList() {
      return this.clientProfileList.filter(profile => {
        return profile.title.toLowerCase().includes(this.search.toLowerCase())
      })
    }
  }
})

Autocomplete with Search box in vuejs Demo
Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Vuejs Live Search Filter Example with Demo.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Laravel Vuejs Ajax Validation Tutorial With Example 0

Laravel Vuejs Ajax Validation Tutorial

Today, We want to share with you Laravel Vuejs Ajax Validation Tutorial.In this post we will show you Simple Laravel Vuejs Form Validation Example, hear for file upload size limit validation in vuejs we will give you demo and example for implement.In this post, we will learn about Image upload and validation using Laravel and VueJs with an example.

Laravel Vuejs Ajax Validation Tutorial

There are the Following The simple About Laravel Vuejs Ajax Validation Tutorial Full Information With Example and source code.

As I will cover this Post with live Working example to develop Vuejs Form Validation Tutorial With Example From Scratch , so the someSimple Laravel Vuejs Form Validation for this example is following below.

Step 1 : Create Vuejs components

resources/assets/js/components/FileUpload.vue

<h2>Image upload and validation using Laravel and VueJs</h2>
<template>
    <div class="row">
        <div class="col-md-12">
            <div class="col-md-2">
                <img :src="image" class="pakainfo img-responsive">
            </div>
            <div class="col-md-8">
                <input type="file" v-on:change="onFileChange" class="pakainfo form-control">
            </div>
            <div class="col-md-2">
                <button class="pakainfo btn btn-success btn-block" @click="upload">Upload</button>
            </div>
        </div>
    </div>
</template>
<style scoped>
    img{
        max-height: 38px;
    }
</style>
<script>
    export default{
        data(){
            return {
                image: ''
            }
        },
        methods: {
            onFileChange(e) {
                let myfiles = e.target.files || e.dataTransfer.files;
                if (!myfiles.length)
                    return;
                this.livepreviewImg(myfiles[0]);
            },
            livepreviewImg(datafile) {
                let filereader = new FileReader();
                let vdatam = this;
                filereader.onload = (e) => {
                    vdatam.image = e.target.result;
                };
                filereader.readAsDataURL(datafile);
            },
            upload(){
                axios.post('Base_URL/api/upload',{image: this.image}).then(response => {

                });
            }
        }
    }
</script>

Step 2: register vuejs

FileUpload component Simple register it in app.js

Vue.component('file-upload',require('./components/FileUpload.vue'));

vuejs registered our component

<file-upload></file-upload>

Step 3: Laravel View Files

welcome.blade.php

@extends('layouts.app')

@section('content')
<h1>Image upload and validation using Laravel and VueJs</h1>
<div class="pakainfo container">
    <div class="pakainfo row">
        <div class="pakainfo col-md-8 col-md-offset-2">
            <div class="pakainfo panel panel-default">
                <div class="pakainfo panel-heading">Upload your Members Profile image!</div>
                <div class="pakainfo panel-body">
                    <file-upload></file-upload>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

Setp 4 : Define a Laravel Routes

Laravel Route(axios post method)

Route::post('/upload', function (Request $datarequest) {
    $validator = Validator::make($datarequest->all(), [
        'image' => 'required|image64:jpeg,jpg,png'
    ]);
    if ($validator->fails()) {
        return response()->json(['errors'=>$validator->errors()]);
    } else {
        $allImgData = $datarequest->get('image');
        $myfileName = Carbon::now()->timestamp . '_' . uniqid() . '.' . explode('/', explode(':', substr($allImgData, 0, strpos($allImgData, ';')))[1])[1];
        Image::make($datarequest->get('image'))->save(public_path('uploads/').$myfileName);
        return response()->json(['error'=>false]);
    }
});

AppServiceProvider

public function boot()
{
    Validator::extend('image64', function ($attribute, $value, $allparamval, $validator) {
        $type = explode('/', explode(':', substr($value, 0, strpos($value, ';')))[1])[1];
        if (in_array($type, $allparamval)) {
            return true;
        }
        return false;
    });

    Validator::replacer('image64', function($message, $attribute, $rule, $allparamval) {
        return str_replace(':values',join(",",$allparamval),$message);
    });
}

validation.php

'image64' => 'The :attribute must be a Live file of type: :values.',

'custom' => [
        'attribute-name' => [
            'rule-name' => 'custom-message',
        ],
    ],

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Laravel Vuejs Ajax Validation Tutorial.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

create custom seo friendly url in vuejs Example 0

create custom seo friendly url in vuejs

Today, We want to share with you create custom seo friendly url in vuejs.In this post we will show you Create your Vue.js application SEO friendly, hear for VueJS – How to create SEO friendly sluggable URL we will give you demo and example for implement.In this post, we will learn about How to build a pre-rendered, SEO-friendly Vue.js app with an example.

create custom seo friendly url in vuejs

There are the Following The simple About create custom seo friendly url in vuejs Full Information With Example and source code.

As I will cover this Post with live Working example to develop php – Vue js seo friendly Slug Example, so the Search Engine Optimized with Vue.js Application for this example is following below.

Heady Stuff in Vuejs

import Vue from 'vue';
...
import Meta from 'vue-meta';

Vue.use(Meta);
...

Vuejs Meta tags Example

<template>
  ...
</template>

<script>
export default {
  ...
  metaInfo: {
    title: 'Welcome To Pakainfo.com',
    // Result: Welcome To Pakainfo.com ← Pakainfo.com
    // it will become: My Other Page Title ← Pakainfo.com
    titleTemplate: '%s ← Pakainfo.com',
    // Define meta tags here.
    meta: [
      {http-equiv: 'Content-Type', content: 'text/html; charset=utf-8'},
      {name: 'viewport'. content: 'width=device-width, initial-scale=1'},
      {name: 'description', content: 'Our mission is to provide the best online resources on programming and web development.'}
    ]
  }
}
</script>

Social tags in Vuejs Application

metaInfo: {
  ...
  meta: [
    ...

    {property: 'og:title', content: 'My Page Title ← Pakainfo.com'},
    {property: 'og:site_name', content: 'Pakainfo.com'},
    // The list of types is available here: http://ogp.me/#types
    {property: 'og:type', content: 'website'},
    {property: 'og:url', content: 'https://www.pakainfo.com/my-special-page'},
    {property: 'og:image', content: 'https://www.pakainfo.com/my-special-image.jpg'},
    {property: 'og:description', content: 'pakainfo is the most popular Programming & Web Development blog.'}

    // Twitter card
    {name: 'twitter:card', content: 'pakainfo is the most popular Programming & Web Development blog'},
    {name: 'twitter:site', content: 'https://www.pakainfo.com/my-special-page'},
    {name: 'twitter:title', content: 'My Page Title ← Pakainfo.com'},
    {name: 'twitter:description', content: 'pakainfo is the most popular Programming & Web Development blog.'},
    {name: 'twitter:creator', content: '@pakainfo'}
    {name: 'twitter:image:src', content: 'https://pakainfo.com/wp-content/uploads/2018/01/cropped-pakainfo-logo.png'},

    // Google / Schema.org markup:
    {itemprop: 'name', content: 'My Page Title ← Pakainfo.com'},
    {itemprop: 'description': 'Our mission is to provide the best online resources on programming and web development.'},
    {itemprop: 'image', content: 'https://pakainfo.com/wp-content/uploads/2018/01/cropped-pakainfo-logo.png'}
  ]
}

Canonical link in Vuejs

metaInfo: {
  ...
  links: [
    {rel: 'canonical', href: 'https://pakainfo.com/vuejs-double-click-to-inline-editing-vue-grid-component/	'}
  ]
}

Vuejs Sitemaps

Vuejs An example of the sitemap

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
  <url>
    <loc>https://www.pakainfo.com</loc>
  </url>
  <url>
    <loc>https://pakainfo.com/vuejs-crud-insert-update-delete-operations-example-demo/</loc>
  </url>
  <url>
    <loc>https://pakainfo.com/vuejs-crud-operations-with-php-and-mysqli-example/</loc>
  </url>
  <url>
    <loc>https://pakainfo.com/inline-table-editing-row-using-vuejs/</loc>
  </url>
</urlset>

Last things, We can include the SEO Search sitemap in main file robots.txt by adding a line simple such as:

Include Sitemap in Vuejs website

Sitemap: https://www.live-website-name.com/sitemap.xml

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about create custom seo friendly url in vuejs.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Get all checked Checkbox Values using VueJS 0

Get all checked Checkbox Values using VueJS

Get all checked Checkbox Values using VueJS

In this Post We Will Explain About is Get all checked Checkbox Values using VueJS With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to arrays – How to get checkbox value in VueJS Example

In this post we will show you Best way to implement VueJS – How to get the selected check box value, hear for how to get ng repeat checkbox values on submit function in VueJS with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Include External Libs

https://vuejs.org/js/vue.min.js

index.html

<h2>Get all checked Checkbox Values using VueJS</h2>
<div id="liveApp">
  <ul>
    <li>
       {{teacherCat.sameStudId}}

    </li>
  </ul>
  <!-- Devloped by Pakainfo.com free download examples -->
  {{ studentChecked }}
</div>

index.js

var liveApp = new Vue({
  el: '#liveApp',
  data: {
    studentChecked: [],
    schoolsCat: [{
        sameStudId: '9898'
      }, {
        sameStudId: '4141'
      }] //testing with some data use like this: [{done:false,content:'testing'}]
  },
  methods: {
    check: function(e) {
      if (e.target.checked) {
        console.log(e.target.value)
      }
    }
  }
})

style.css

li.done {
  text-decoration: line-through;
}
[v-cloak] {
  display: none;
}

body {
  font-family: Helvetica Neue, Arial, sans-serif;
}

get all checked checkbox value in VueJS

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is Get all checked Checkbox Values in vuejs And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

Inline Table Editing Row using Vuejs 0

Inline Table Editing Row using Vuejs

Inline Table Editing Row using Vuejs

In this Post We Will Explain About is Inline Table Editing Row using Vuejs With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to javascript – Vue.js v-component on table Example

In this post we will show you Best way to implement Simple Table Inline Edit For Vue.js 2, hear for javascript – Vue.js v-component on table with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Vue.JS – Advanced Data Grid Component

A simple Vue.js component that best way to enables all the table row inline editing functionality on your HTML table cells.

Include External Libs

index.html



  
  <title>Pakainfo.com | Inline Table Editing Row using Vuejs</title>
  

  <div id="liveApp">
    <button>Clone Last Student</button>
  <table border="1" width='100%'>
    <tr>
      <th>Student</th>
      <th>Place Name</th>
      <th>Nationality Name</th>
      <th>Action</th>
    </tr>
   <tr>
      <td>
        <span></span>
        <span>{{student.name}}</span>
      </td>
      <td>
        <span>
          
            {{option.val}}
            
        </span>
        <span>{{student.place}}</span>
      </td>
      <td>
        <span>
          
          
            {{option.val}}
          
        </span>
        <span>{{student.nationality}}</span>
      </td>
   
      <td>
      <span><button>Edit</button></span>
      <span><button>Save</button></span>
      </td>
    </tr>
     
 </table>
 {{ students }}
    </div>


index.js

  console.clear()
  
  new Vue({
    el: '#liveApp',
    
    data: {
      students: [
        {name: 'Jaydeep Gondaliya', place:'Rajkot', nationality: 'US', student_id:'23', city_id:'4'},
        {name: 'Ankit Katariya', place:'Kalavad', nationality: 'UK', student_id:'13', city_id:'33'},
        {name: 'Krunal sisodariya', place:'Surat', nationality: 'US', student_id:'3', city_id:'11'},
      ],
      places: [
          {id:'4', val:'Rajkot', student_id:'23'},
          {id:'33', val:'Kalavad', student_id:'13'},
          {id:'11', val:'Surat', student_id:'3'},
         ],
      nationalities: [
          {id:'23', val:'PAK'},
          {id:'13', val:'UK'}, 
          {id:'3', val:'US'}, 
        ]
      
    },
    computed:{
      paceBynat(){
        return this.nationalities.reduce((acc, nationality) => {
          acc[nationality.id] = this.places.filter(c => c.student_id == nationality.id)
          return acc
        }, {})
      }
    },
    methods: {
      edit :function(obj){
        this.$set(obj, 'studEdit', true);
      },
      save : function(obj){
        this.$set(obj, 'studEdit', false);
      },
      lastStud:function(){
        var getlastData = this.students[this.students.length-1];
        getlastData = JSON.parse(JSON.stringify(getlastData));
        getlastData.studEdit = true;
        this.students.push(getlastData);
      },
      
    }
  });

Inline Table Editing Row using Vuejs

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is Vue.JS – Advanced Data Grid Component And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

Vue js Fancybox Popup Simple Example 0

Vue js Fancybox Popup Simple Example

Today, We want to share with you Vue js Fancybox Popup Simple Example.In this post we will show you vue.js – Open jquery Fancybox in b-modal VueJS, hear for Facebook-like Lightbox Carousel Component For Vue.js we will give you demo and example for implement.In this post, we will learn about Create an image gallery with Vue.js Lightbox component with an example.

Vue js Fancybox Popup Simple Example

There are the Following The simple About Vue js Fancybox Popup Simple Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop Multiple Photo Galleries Built With Vue.js 2, so the Image Gallery Lightbox For Vue.js – v-img for this example is following below.

External CDN

Include External CDN for CSS and Javascript width vuejs

<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css"/>
<link type="text/css" rel="stylesheet" href="//unpkg.com/[email protected]/dist/bootstrap-vue.css"/>

<script src="https://unpkg.com/[email protected]/dist/vue.min.js" ></script>

<script src="//unpkg.com/[email protected]/dist/polyfill.min.js"></script>
<script src="//unpkg.com/[email protected]/dist/bootstrap-vue.js"></script>

<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.4.1/jquery.fancybox.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.4.1/jquery.fancybox.min.js"></script>

Step 1 : Main index HTML interface

index.html

<h2>vue.js - Open jquery Fancybox in b-modal VueJS</h2>
<div id="liveApp">
  {{Fancybox}}
  <br />
  <button v-on:click="showModal">Display Fancybox</button>
  <b-modal
  ref="myModal"
>
  <div class="d-block text-center">
        <h3>Fancy</h3>
     <a
      class="fancybox"
      href="https://images.pexels.com/photos/1411677/pexels-photo-1411677.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
      Open
    </a>
   </div>
</b-modal>
</div>

Step 2 : Custom vuejs Scripts

index.js

//Create an image gallery with Vue.js Lightbox component
var vm = new Vue({
  data: {
    Fancybox:'Welcome To pakainfo'
  },
  el:'#liveApp',
  methods:{
    showModal:function(){

      this.$refs.myModal.show();
      $(".fancybox").fancybox({
  width  : 800,
  height : 400
        //,
//  type   :'iframe'
});
      
    }
  }
})

Create an image gallery with Vue.js Lightbox component
Angular 6 CRUD Operations Application Tutorials

Read :

Related Search : vue mobile lightbox,vue silentbox,lightbox touch,vlightbox,v img,vue image lightbox demo,Mobile-friendly Vue.js Gallery Lightbox Component – vue-images,Create an image gallery with Vue.js Lightbox component,vue.js – Open jquery Fancybox in b-modal VueJS,Facebook-like Lightbox Carousel Component For Vue.js,Multiple Photo Galleries Built With Vue.js 2,Image Gallery Lightbox For Vue.js – v-img,Touch-enabled Lightbox Library For Vue.js,Native Vue.js Lightbox Component,Simple Lightbox Gallery Component For Vue.js – Silentbox

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Vue js Fancybox Popup Simple Example.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Laravel vuejs Insert Multiple Checkbox Value in Database 0

Laravel vuejs Insert Multiple Checkbox Value in Database

Today, We want to share with you Laravel vuejs Insert Multiple Checkbox Value in Database.In this post we will show you Laravel Vue js Multiple Checkbox Save from Database, hear for Vue resource and multiple checkbox values store in Laravel we will give you demo and example for implement.In this post, we will learn about vue js Checkbox Checked And Save Multiple Checkbox In Database using Laravel 5.7 with an example.

Laravel vuejs Insert Multiple Checkbox Value in Database

There are the Following The simple About Laravel vuejs Insert Multiple Checkbox Value in Database Full Information With Example and source code.

As I will cover this Post with live Working example to develop Laravel Vue js Multiple Checkbox Save from Database, so the Vue.js Check Uncheck All Checkboxes in Laravel for this example is following below.

Step 1 : Install Vuejs Application in Vue CLI

start to, make Vue.js Application using Vue CLI on Terminal.

vue create mulcheckbox

Import Bootstrap Javascript and CSS files
npm install bootstrap --save

import Vue from 'vue'
import App from './App.vue'

import 'bootstrap/dist/css/bootstrap.min.css';

Vue.config.productionTip = false

new Vue({
  render: h => h(App)
}).$mount('#myliveapp')

Step 2: Make a HTML form in vuejs component.

src/App.vue

<template>
  <div id="myliveapp" class="container">
    <h2>Vue JS - how to save checkbox with multiple value in laravel 5.7</h2>
	<p>vuejs Insert Multiple Checkbox Value in Database Using Laravel</p>
    <form @submit.prevent="memberStore()">
      <div class="dsp form-group">
        <div class="form-check dsp">
          <label for="joe" class="pakainfo form-check-label gst">
            <input type="checkbox" 
                    id="joe" 
                    class="form-check-input"
                    value="joe" 
                    v-model="selectedMembers" />            
            Joe
          </label>
        </div>
       <div class="dsp form-check">
          <label for="jaydeep" class="pakainfo form-check-label gst">
            <input type="checkbox" 
                    id="jaydeep" 
                    class="form-check-input"
                    value="jaydeep" 
                    v-model="selectedMembers" />            
            Jaydeep
          </label>
        </div>
        <div class="dsp form-check">
          <label for="Nirav" class="pakainfo form-check-label gst">
            <input type="checkbox" 
                    id="nirav" 
                    class="form-check-input"
                    value="nirav" 
                    v-model="selectedMembers">            
            Nirav
          </label>
        </div>
        <br>
      </div>
      <div class="dsp form-group">
        <button class="btn btn-primary">Submit</button>
      </div>
    </form>
  </div>
</template>

<script>

export default {
  data() {
    return {
      selectedMembers: []
    }
  },
  methods: {
    memberStore() {
      console.log(this.selectedMembers.toString());
    }
  }
}
</script>

Step : 3 – install vue-axios and axios

Setup Laravel axios vue library and memberStore server side values.

npm install vue-axios axios --save

main.js

//Vue.js Check Uncheck All Checkboxes in Laravel 5.7
import Vue from 'vue'
import App from './App.vue'
import axios from 'axios'
import VueAxios from 'vue-axios'

Vue.use(VueAxios, axios)
//implement import bootstrap CSS
import 'bootstrap/dist/css/bootstrap.min.css';

Vue.config.productionTip = false

new Vue({
  render: h => h(App)
}).$mount('#myliveapp')

App.vue

<template>
  <div id="myliveapp" class="container">
    <h2>Vue Multiple Checkbox Example</h2>
	<p>Vue.js Check Uncheck All Checkboxes in Laravel</p>
    <form @submit.prevent="memberStore()">
      <div class="form-group dsp">
        <div class="dsp form-check">
          <label for="joe" class="pakainfo form-check-label gst">
            <input type="checkbox" 
                    id="joe" 
                    class="form-check-input"
                    value="joe" 
                    v-model="selectedMembers" />            
            Joe
          </label>
        </div>
       <div class="dsp form-check">
          <label for="jaydeep" class="pakainfo form-check-label gst">
            <input type="checkbox" 
                    id="jaydeep" 
                    class="form-check-input"
                    value="jaydeep" 
                    v-model="selectedMembers" />            
            Jaydeep
          </label>
        </div>
        <div class="dsp form-check">
          <label for="Nirav" class="pakainfo form-check-label gst">
            <input type="checkbox" 
                    id="nirav" 
                    class="form-check-input"
                    value="nirav" 
                    v-model="selectedMembers">            
            Nirav
          </label>
        </div>
        <br>
      </div>
      <div class="dsp form-group">
        <button class="btn btn-primary">Submit</button>
      </div>
    </form>
  </div>
</template>

<script>

export default {
  data() {
    return {
      selectedMembers: []
    }
  },
  methods: {
    memberStore() {
      let obj = {
        select_members: this.selectedMembers
      }
      this.axios.post('http://localhost:8000/api/memberselects', obj)
          .then(res => console.log(res.data));
    }
  }
}
</script>

Step 4 : Setup Laravel 5.7 Application

Install Laravel Backend API

composer create-project laravel/laravel atmiya25 --prefer-dist

Step 4.1 Laravel Model, migration and Controller

Create a Laravel model, Laravel migration, as well as Laravel controller

php artisan make:model Member -m
php artisan make:controller memberController

Create a Laravel Database Table

public function up()
{
        Schema::create('memberselects', function (Blueprint $table) {
            $table->increments('id');
            $table->string('select_members');
            $table->timestamps();
        });
}

//migrate the database using Laravel PHP artisan
php artisan migrate

Step 4.2 : Define a Laravel Routing

routes/api.php

Route::post('memberselects', '[email protected]');

memberController.php

<?php

// memberController.php

namespace App\Http\Controllers;
use App\Member;

use Illuminate\Http\Request;

class memberController extends Controller
{
    public function store(Request $request)
    {
      $member = new Member;
      $members = implode(",", $request->get('select_members'));
      $member->select_members = $members;

      $member->save();

      return response()->json('Your All the member Data values has been saved successfully');
    }
}

Step 5: Laravel Handle CORS problem

Setup using the following simple Solution Adding Cross Origin Resource Sharing (CORS) command on Terminal.

composer require barryvdh/laravel-cors

Step 6 : Included Laravel Group api middleware

App/Http/Kernel.php

'api' => [
     'throttle:60,1',
     'bindings',
     \Barryvdh\Cors\HandleCors::class,
],

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Laravel vuejs Insert Multiple Checkbox Value in Database.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.