jeudi 1 juin 2017

How can I get select option text in Laravel Controller

I'm using Laravel 5.4, I have a form with post method and inside I have a select with some options

<select name="selection-list">
    <option value="1">A</option>
    <option value="2">B</option>
    <option value="3">C</option>
</select>

If I use

echo $request->input('selection-list');

I only got the value of the selected option, but I want the text between selected option tags.

How can I perform this action in Laravel?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire