Dynamic Select Boxes with Laravel 5

This is how you can create a dynamic select box with Laravel passing data from your controller to blade view.

  1. select2 js plugin
  2. mutiple select options
  3. dynamic options
  4. option groups

HTML (BLADE PHP)

JS

LARAVEL

problems:
only first selection option is passed through to controller in request params

solved.
solved when adding [] to input name and adding multiple to array params

Sam Deering is a web developer from England (currently living in Australia). In his spare time he enjoys coding, playing chess, reading and investing.

Leave a Reply

Your email address will not be published. Required fields are marked *