How do I get the id of after the select?

Asked

Viewed 42 times

0

user selects a user by name, I need to find out which id is chosen. Thanks guys, I’m new to Laravel!

How I get the value of users->id?

{!! Form::select(
    'id_users',
    $users->pluck('name'),
    $users->pluck('id'),
    [],
    ['class' => 'form-control']
) !!}
  • Thank you very much for the corrections Guilherme Cosamilam!!!!

1 answer

0

Wow! After two days I discovered the mistake... only in my original form had a comma left. The Code is correct and $users->Pluck('id') is the code I need in the role! Thanks to all those who tried to help me...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.