https://makitweb.com/loading-data-remotely-in-select2-with-ajax/ as noted here
NOTE – While creating associative array for initialize the Array make sure that their you have defined id and text keys otherwise the HTML element will not be initialized.
you may need to
return $tag_list->map(function($tags) {
return [ 'id' => $tags->id, 'text' => $tags->t_name ];
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community