IIRC data-* attributes are used mainly for CSS and Javascript. You'll want to use the value
attribute
<option value="{{ $dept->dept_code }}">{{ $dept->dept_name }}</option>
gizzmo said:
IIRC data-* attributes are used mainly for CSS and Javascript. You'll want to use the
value
attribute<option value="{{ $dept->dept_code }}">{{ $dept->dept_name }}</option>
thanks gizzmo, how do we retrieve it then? I think Input::all() will not do the trick.
\Input:all();
Will give you all fields, so you would need to do something like
$input = \Input::all();
$var = $input['select'];
This assumes your select is named "select":
<select name="select">
,,,,
You might want to also look at "request" in the docs as well: http://laravel.com/docs/5.1/requests#retrieving-input
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community