Bootstrap Toggle switch with ajax update to mysql in Laravel

Bootstrap Toggle switch with ajax update to mysql in Laravel

In this Post We Will Explain About is Bootstrap Toggle switch with ajax update to mysql in Laravel With Example and Demo.Welcome on – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Bootstrap Toggle Inside jQuery DataTable in Laravel Example

Free Live Chat for Any Issue

In this post we will show you Best way to implement Laravel Bootstrap Toggle switch Update DB field using Ajax, hear for Create Radio Button Toggle Switch with Bootstrap, jQuery & Laravel with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Read Also:  Laravel Ajax Bootstrap Toggle switch Update MySQL

Laravel – Toggle value in database with checkbox and ajax

I have a very easy task.but some devloper is stuck so here Update a value in mysql table when button is on click using Laravel with MYSQL and Jquery Means simple meaningCreate Checkbox Toggle Switch with Bootstrap, jQuery & Laravel.

public function activation(Request $request)

    $Product = Product::findOrFail($request->product_id);

    if($Product->active == 1){
        $Product->active = 0;
    } else {
        $Product->active = 1;

    return response()->json([
      'data' => [
        'success' => $Product->save(),

And then in the front-end part:

  $("input:checkbox").change(function() {
    var product_id = $(this).closest('tr').attr('id');

            headers: {'X-CSRF-TOKEN': '{{ csrf_token() }}' },
            data: { "product_id" : product_id },
            success: function(data){
                //here some source code - do something

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

Read Also:  Login Signup with Laravel



I hope you have Got What is Submit Laravel Bootstrap Form without Page Refresh using jQuery, Ajax And how it works.I would Like to have FeedBack From My Blog( readers.Your Valuable FeedBack,Any Question,or any Comments about This Article( Are Most Always Welcome.