Populating dropdown menu from MySQL database

Posted 3 months ago by BarbaraTackaBa

Hello everybody! I have problem with my window modal. My code is here:


Route::resource('/admin/directory','DirectoriesController'); //Directory - routes
Route::get('/admin/directory','[email protected]');


public function getDropdown()
    $genders = Gender::pluck('gender', 'id');
    $statuses = Status::pluck('status', 'id');
    return view('pages.admin.modals-admin.create.add-directory', compact('genders', 'statuses'));


  <div class="form-group">
    {{Form::select('gender', $genders,'', ['class' => 'form-control'])}}
  <div class="form-group">
    {{Form::select('status', $statuses,'', ['class' => 'form-control'])}}

It works ok but it doesn't look as it should be.. It looks like plain text... It should be modal window (form) from Bootstrap... and also other links (modals) don't work... And before adding dropdown menu looked good..

What I did wrong?

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

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.