Laravel Dynamic Dependent Dropdown using Ajax

Поделиться
HTML-код
  • Опубликовано: 19 мар 2018
  • Learn How to Make Dynamic Dependent in Laravel using Ajax. How to use Laravel with Ajax for populate dropdown listbox with dynamic data. How to Create Dynamic Dropdown in Laravel. Dynamic Dependent Dropdown in Laravel using jQuery and Ajax.
    Source Code - www.webslesson.info/2018/03/aj...

Комментарии • 78

  • @jhanhm
    @jhanhm 6 лет назад

    Thanks Weblesson for sharing knowledge

  • @SuperMakoto13
    @SuperMakoto13 5 лет назад

    Awesome video, thanks for the lesson!

  • @tinkerbell6834
    @tinkerbell6834 3 года назад

    Thanks for your time and efforts it helped me a lot

  • @khoadoo5505
    @khoadoo5505 5 лет назад

    thanks Webslesson, this help me alot.

  • @animanoir
    @animanoir 5 лет назад

    Great stuff my friend, thank you.

  • @kmsohelrana8246
    @kmsohelrana8246 5 лет назад

    wow what a great job.thank you very much

  • @uristmsk
    @uristmsk 5 лет назад +2

    thx, it's very help me! cool code!

  • @NanoRdz1976
    @NanoRdz1976 5 лет назад

    Hi, thanks for sharing this video, I want to see if you can help me, I have only two dropdowns for state and city. The values of the city dropdown are loaded correctly, but if there is some validation that is not fulfilled in the form, for example a field not captured, the city dropdown loses the elements that had been previously loaded.
    Thank you in advance if you could guide me

  • @bigcato5840
    @bigcato5840 5 лет назад +22

    i'm quite annoyed by the voice. but great stuff, thanks..

  • @maliqnorman5539
    @maliqnorman5539 5 лет назад +7

    sir, just follow up question.. is this the best way to approach dynamic dependent dropdown? specially on country state city situation? how bout the relationship type like each has its own table.. table country, table state, table city and connect them using relationships.. please i need ur opinion on this since im a newbie..

  • @olayemiolaribigbe3333
    @olayemiolaribigbe3333 4 года назад +1

    thanks for the tutorial, please state data and city is not loading when the country option is selected from my end, it just remain blank, any help ?

  • @nabeeltahir6013
    @nabeeltahir6013 6 лет назад

    Thank you very much sir

  • @bushramustofa2135
    @bushramustofa2135 5 лет назад

    Thanks team weblesson

  • @nandalals9441
    @nandalals9441 6 лет назад +1

    Hi sir, Please make more video on laravel and ajax CRUD with full form elements includes input type file

  • @icrmsoftware59
    @icrmsoftware59 5 лет назад +1

    Best tutorial

  • @keyurvala2489
    @keyurvala2489 Год назад

    is there any tutorial for getting selected dropdown value from the database using ajax in edit functionality?

  • @nabeeltahir6013
    @nabeeltahir6013 6 лет назад +1

    Please make more video on laravel and ajax

  • @sarandatech4322
    @sarandatech4322 4 года назад +2

    how to use two tables using same method (dependent dropdown) country in one table and state in another table

  • @MDFARUK-il8pw
    @MDFARUK-il8pw 6 лет назад

    you are the web boss

  • @osvaldobanze1845
    @osvaldobanze1845 4 года назад +1

    Obrigado!!

  • @alinoori6931
    @alinoori6931 4 года назад

    it's very very very help me! I love you !

  • @sangeeth810
    @sangeeth810 4 года назад

    great stuff

  • @murleeyadav7800
    @murleeyadav7800 6 лет назад +1

    This video is awesome..
    Can you please tell me what is the use of _token variable in this video

    • @rogeriopicilli5545
      @rogeriopicilli5545 4 года назад +1

      This is for protection. This prevent the CSRF attack

  • @rahim3070
    @rahim3070 6 лет назад +1

    This video is very good for one db table. But, if db table are multiple, then what can I do. Please reply me with a good suggestions.
    Best Regards

    • @braintricker_soft
      @braintricker_soft 3 года назад +1

      just use country id to query in state and state id to query in city table everything is same

  • @Kahanikiduniya5
    @Kahanikiduniya5 3 года назад

    what if we want to select multiple country then show their state together

  • @smartowlgraphics4374
    @smartowlgraphics4374 2 года назад

    I want to change dropdown list colour scheme to blue to green. Is any way? can you please guide me?

  • @aashiqhasnat2
    @aashiqhasnat2 3 года назад

    sometimes you just need the concept ... I made that with Vue js. Thanks

  • @m.abubakarkhan4451
    @m.abubakarkhan4451 Год назад

    This code work well on single value , but not working on multiple select value plz guide me

  • @rahulkrishna7810
    @rahulkrishna7810 2 года назад

    thanks for that code 😁 but the voice irritates more more 😪its not clear ...
    once again thanks for code

  • @heyyy4987
    @heyyy4987 5 лет назад

    I wanna see in vue.js. Nice. Tanks

  • @MDFARUK-il8pw
    @MDFARUK-il8pw 6 лет назад

    please make more tutorial we will be pleased

  • @spreddy23
    @spreddy23 5 лет назад

    groupby clause on Oracle having issues ORA-00979: not a GROUP BY expression.Did anyone have the same issue.Any help is much appreciated.

    • @djohnoliver
      @djohnoliver 4 года назад

      hey there , I am having the same problem have you fixed yours ????

  • @ashwinishahapurkar7478
    @ashwinishahapurkar7478 5 лет назад +1

    How to submit this data from select boxes into new table of database??

    • @AliRazaiamaliraza
      @AliRazaiamaliraza 5 лет назад

      ruclips.net/video/yIs_Y5adAYU/видео.html
      Watch this.

  • @ferdyhananto6279
    @ferdyhananto6279 3 года назад +1

    I follow this code but it cannot show data on dropdown dependent,any one help?

  • @livresonltc9754
    @livresonltc9754 5 лет назад +1

    Hi Thanks for the tut. But for some reason, I can get it work. I'm getting error in the console: POST 127.0.0.1:8000/dynamic_dependent/fetch 500 (Internal Server Error) jquery.min.js:4. Any idea? I tried multiple projects with different machines with same result. I'm using WAMP Server.

    • @trapkick5570
      @trapkick5570 4 года назад +1

      have exactly the same issue. exept for: jquery.min.js:2
      Did You solve this?

    • @mysteriousmsn
      @mysteriousmsn 3 года назад +1

      public function dynamicDropdown() {
      $countrylist = DB::table('dynamicdropdown')->select('Country')->groupBy('Country')->get();
      return view('dynamicdropdown')->with('countrylist', $countrylist);
      }


      function fetch(Request $request)
      {
      $select = $request->get('select');
      $value = $request->get('value');
      $dependent = $request->get('dependent');
      $data = DB::table('dynamicdropdown')
      ->where($select, $value)
      ->select($dependent)
      ->groupBy($dependent)
      ->get();
      $output = 'Select '.ucfirst($dependent).'';
      foreach($data as $row)
      {
      $output .= ''.$row->$dependent.'';
      }
      echo $output;
      }
      Change like this and it will work, you have to use select method, i was getting this error today and fixed and killed my 2 hrs.

    • @tinkerbell6834
      @tinkerbell6834 3 года назад +1

      @@mysteriousmsn You are a life saver thanks so much

    • @mysteriousmsn
      @mysteriousmsn 3 года назад +1

      @@tinkerbell6834 You are Welcome.

  • @luisfernandogonzaleztostad1294
    @luisfernandogonzaleztostad1294 3 года назад

    Hello groupBy('country') method is throwing this error "SQLSTATE[42000]: Syntax error or access violation: 1055 'testing.country_state_city.id' isn't in GROUP BY (SQL: select * from `country_state_city` group by `country`)" Any idea?

  • @nabeeltahir6013
    @nabeeltahir6013 6 лет назад

    Make video on laravel ajax filter using checkbox and start rating .
    Laravel ajax comment system

  • @cocoiron4475
    @cocoiron4475 3 года назад

    i like this

  • @237camerpreneur8
    @237camerpreneur8 5 лет назад

    very nice

  • @devenderkumar2761
    @devenderkumar2761 5 лет назад

    Hello Sir, Nice Video. lease Insert All These Dropdown Values In database Using Laravel . Make A Video Otherwise Add This With register Page.

  • @mdnazimuddin5211
    @mdnazimuddin5211 5 лет назад

    thanks

  • @codewithqdkhan
    @codewithqdkhan 3 года назад +1

    Sir please make Dependent Drop Down in laravel 8 using Ajax and jQuery.........Love From India UP

  • @samoilenko_roman
    @samoilenko_roman 5 лет назад +2

    good! But all in one table...

  • @belongersgaming8046
    @belongersgaming8046 3 года назад

    pdate config/database.php
    set:
    'mysql' => [
    'strict' => false,
    ],
    instead of:
    'mysql' => [
    'strict' => true,
    ],
    after doing this, the error will disappeared

  • @napchannel2703
    @napchannel2703 3 года назад

    mantab slurrrr

  • @armanhossain9936
    @armanhossain9936 5 лет назад

    this source code link can't work can you help me pls

    • @bushramustofa2135
      @bushramustofa2135 5 лет назад

      Arman i think the source code is correct check that
      1. He didn't create controller as usual but it is only DynamicDependent.php
      2. Be sure you write correctly in web.php Don't forget first one is GET method and second one is POST

  • @bennyuntung3706
    @bennyuntung3706 4 года назад

    source code can't download
    please repair link

  • @mysteriousmsn
    @mysteriousmsn 3 года назад

    WHOEVER IS GETTING SERVER ERROR TRY TO IMPLEMENT LIKE BELOW, ALL YOU HAVE TO DO IS TO USE "SELECT" METHOD IN THE QUERY BUILDER FUNCTIONS
    public function dynamicDropdown() {
    $countrylist = DB::table('dynamicdropdown')->select('Country')->groupBy('Country')->get();
    return view('dynamicdropdown')->with('countrylist', $countrylist);
    }


    function fetch(Request $request)
    {
    $select = $request->get('select');
    $value = $request->get('value');
    $dependent = $request->get('dependent');
    $data = DB::table('dynamicdropdown')
    ->where($select, $value)
    ->select($dependent)
    ->groupBy($dependent)
    ->get();
    $output = 'Select '.ucfirst($dependent).'';
    foreach($data as $row)
    {
    $output .= ''.$row->$dependent.'';
    }
    echo $output;
    }

  • @seekeralert9267
    @seekeralert9267 4 года назад

    the database structure isn't good not normalize and can cause a problem for the future use

  • @rahulkrishna7810
    @rahulkrishna7810 2 года назад +1

    next try to put with a original voice ..

  • @LOMBOist
    @LOMBOist 4 года назад +1

    Why that voice ?

  • @jessierhanculubong6242
    @jessierhanculubong6242 4 года назад +1

    Nothing happened 🤤😢😥😭

  • @k3logics925
    @k3logics925 5 лет назад +1

    You forgot to make ajax more secure in controller's action

    • @k3logics925
      @k3logics925 5 лет назад +1

      if($request->ajax()){ //ajax code }

  • @infiappsolution
    @infiappsolution 26 дней назад

    hiiiiiiii

  • @carlahdiesto2481
    @carlahdiesto2481 3 года назад

    mali ang froeach

  • @farahzainodin7593
    @farahzainodin7593 3 года назад +1

    i hate the voice but great job

  • @IphoneUser27
    @IphoneUser27 3 года назад

    I wasted my time on something that doesn't work -.-

  • @infiappsolution
    @infiappsolution 26 дней назад