mg2883
7 months ago

Select users based on user ID

Posted 7 months ago by mg2883

I'm in a bit of a conundrum..I need to make a user selection, but need to limit the options to a specific user id. My case scenario, I am user with an id = 2, as I make a selection, I only want the listed options to be of all users with the id = 1. Here is the code within my blade file:

@if(isset($users))
    {!! Form::select('receiver', $users, old('receiver'), ['class' => 'form-control select2']) !!}
        @elseif(isset($user))
        {!! Form::text('receiver', old('receiver', $user ? $user : ''), ['class' => 'form-control', 'disabled']) !!}
@endif

If anyone could possibly help with a solution to this matter, I'd greatly appreciate it.

** If more information is needed in order to help, i'm more than happy to supply **

Please sign in or create an account to participate in this conversation.