Populating dropdown menu from MySQL database

Posted 10 months ago by BarbaraTackaBa

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

web.php

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

Controller

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'));
}

View

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

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.