title: Bootstrap Modal Not Showing - Laravel - AdminLTE
body: <p>i'm using an <a href="https://github.com/jeroennoten/Laravel-AdminLTE" rel="nofollow noreferrer">AdminLTE package</a> with Laravel to give me the AdminLTE theme for my app. </p>
  
  <p>I cannot get the modal to launch at all. If I copy the contents of my <code>form.blade.php</code> into my <code>index.blade.php</code> it works. Although the way i have coded my controller &amp; views i need them to be independent files.</p>
  
  <ul>
  <li>Index.blade.php &lt;- view serving the datatable</li>
  <li>form.blade.php &lt;-- view serving the modal from click edit on index.blade.php</li>
  <li>CostCenterController.php &lt;-- Controller responsible for both views.</li>
  </ul>
  
  <h2>CostCenterController.php</h2>
  
  <p>So in my controller I have a function that returns the results with server side processing into my datatable, this is just the part showing how each item in the table is generated, specifically with the btn-group for the edit function.:
  </p>
  
  <pre class="lang-php prettyprint-override"><code> $data = array();
          if (!empty($costcenters)){
              foreach ($costcenters as $costcenter){
                  $editURL = "delete/".$costcenter-&gt;id;
                  $temp['name'] = $costcenter-&gt;name;
                  $temp['code'] = $costcenter-&gt;code;
                  $action = '';
                  $action .= '
                  &lt;div class="btn-group"&gt;
                    &lt;a href="'.route("costcenter.edit",$costcenter-&gt;id).'" class="btn btn-info modal-content"  data-toggle="modal" data-target="#modal"&gt;&lt;i class="fa fa-edit"&gt;&lt;/i&gt;&lt;/a&gt;
                   &lt;a href="'.route("costcenter.delete",$costcenter-&gt;id).'"  type="button" class="btn btn-danger"&gt;&lt;i class="fa fa-trash"&gt;&lt;/i&gt;&lt;/a&gt;
                  &lt;/div&gt;
                  ';
  
                  $temp['action'] = $action;
                  array_push($data, $temp);
  
              }//end for each
          }// end if empty
  
          $recordsTotal = count($recordsTotal);
          echo json_encode(array('recordsTotal' =&gt; $recordsTotal, 'data' =&gt; $data, 'recordsFiltered' =&gt; $recordsTotal));
  </code></pre>
  
  <p>In my <code>index.blade.php</code> i have nothing of importance or relevance really.</p>
  
  <h2>form.blade.php</h2>
  
  <p>I created a <code>form.blade.php</code> so when I hit edit, a route calls this view with the data needed from the edit function in the associated controller. This view works as plain html if opened in a new tab.
  </p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;div class="modal fade" id="modal" role="dialog"&gt;
  &lt;div class="modal-dialog" &gt;
  @if ($mode == 'edit')
          {!! Form::model($costcenter,array('route'=&gt;array('costcenter.update',$costcenter-&gt;id),'id'=&gt;'costcenter-form')) !!}
          @else
          {!! Form::open(array('url'=&gt;'costcenter/store','method'=&gt;'post','data-toggle'=&gt;'validator','id'=&gt;'costcenter-form')) !!}
          @endif
          &lt;div class="modal-content"&gt;
            &lt;div class="modal-header"&gt;
              &lt;h5 class="modal-title" id="exampleModalLabel"&gt;
               @if ($mode == 'edit') 
                   Edit {{$costcenter-&gt;name}}'s Cost Center
                   @else 
                   Create Cost Center 
               @endif
              &lt;/h5&gt;
              &lt;button aria-label="Close" class="close" data-dismiss="modal" type="button"&gt;&lt;span aria-hidden="true"&gt; &amp;times;&lt;/span&gt;&lt;/button&gt;
            &lt;/div&gt;
            &lt;div class="modal-body"&gt;
              &lt;form&gt;
                &lt;div class="form-group"&gt;
                    {!! Form::label('name','Cost Center Name:',['class'=&gt;'control-label']) !!}
                    {!! Form::text('name',null,['class'=&gt;'form-control','placeholder'=&gt;'Enter Cost Center Name','data-error'=&gt;"Please enter the name of the cost center",'required'=&gt;true]) !!}
                &lt;/div&gt;
                &lt;div class="form-group"&gt;
                    {!! Form::label('code','CostCenter Code:',['class'=&gt;'control-label']) !!}
                    {!! Form::text('code',null,['class'=&gt;'form-control','placeholder'=&gt;'Cost Center code as it appears in SYSPRO.','data-error'=&gt;"Invalid Cost Center Code.",'required'=&gt;true]) !!}
                &lt;/div&gt;
  
              &lt;/form&gt;
            &lt;/div&gt;
            &lt;div class="modal-footer"&gt;
            {!! Form::submit('Save',['class'=&gt;'btn btn-primary'])!!}
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>Any help would be appreciated.</p>