Problem with modal window (EDIT)

Posted 1 month ago by BarbaraTackaBa

I have problem with modal window (on edit). It won't show/open. Here is my code.

directory.blade.php

 <tbody class="text-center">
                            <?php $i=1; ?>
                            @foreach($directories as $item)
                            <tr>
                                <td scope="row">{{ $i }}</td>
                                <td>{{ $item->name }}</td>
                                <td>{{ $item->surname }}</td>
                                <td>{{ $item->email }}</td>
                                <td>{{ $item->phone }}</td>
                                <td>{{ $item->town }}</td>
                                <td>{{ $item->country }}</td>
                                <td>{{ $item->gender }}</td>
                                <td>{{ $item->status }}</td>
                                <td><a href="#editDirectory/{{ $item->id}}" data-target="#editDirectory" data-toggle="modal"><img src="{{ asset('storage/admin/edit.png') }}" height=23 width=23 class="mx-auto d-block"/></a></td>
                                <td><a href="#deleteDirectory{{ $item->id}}" data-toggle="modal" class="text-center"><img src="{{ asset('storage/admin/delete.png') }}" height=23 width=23 class="mx-auto d-block"/></a></td>
                             <?php $i++; ?>
                            </tr>
                            @endforeach 
modal
            <div class="modal fade bd-example-modal-md" id="editDirectory" tabindex="-1" role="dialog" aria-labelledby="editDirectoryModalLabel" aria-hidden="true" data-backdrop="false">
              <div class="modal-dialog modal-md" role="document">
                <div class="modal-content">

                {!! Form::open (['method' => 'POST', 'action' => ['[email protected]',$directories->id]]) !!}
                {!! csrf_field() !!}

                  <div class="modal-header">
                    <h5 class="modal-title" id="editDirectoryModalLabel">Ažuriranje novog korisnika</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                      <span aria-hidden="true">×</span>
                    </button>
                  </div>
                  <div class="modal-body">
                    @include('pages.admin.forms-admin.edit.edit-directory')
                  </div>
                {!! Form::hidden('_method','PUT')!!}
                {!! Form::close() !!}
                </div>
              </div>
            </div>

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

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.