title: Laravel blade template not rendering with slug
body: <p>Hi maybe I am missing something here however if I use a route such as </p>
  
  <blockquote>
    <p>/admin-user-management</p>
  </blockquote>
  
  <p>Then the blade template renders correctly. However using the exact code, copy/pasted into another view with the route</p>
  
  <blockquote>
    <p>/admin/{id}</p>
  </blockquote>
  
  <p>Then the view does not render the template.</p>
  
  <p>Both views are identical in every single way, one renders the view correctly with the template while the other one with a slug will not render the template correctly, it will spit out elements at random however it does not render the actual layout correctly.</p>
  
  <p>Why would they be different? This is not the first time I've come across this either and I'm just stumped as to what the difference would be if a slug is in the URL or not. </p>
  
  <p>Once again, both files are identical.</p>
  
  <p>One is the useraccounts function, the other is the show function on the controller.</p>
  
  <pre><code>public function show($id)
  {
      $user=User::find($id);
      return view('admin.show',compact('user'));
  }
  
  public function useraccounts()
  {
      $users = User::all();
      return view('admin.useraccounts', compact('users'));
  }
  </code></pre>
  
  <p>And the button that displays the user details is as follows</p>
  
  <pre><code>&lt;a href="{{route('admin.show',$user)}}" class="btn btn-primary"&gt;View all information&lt;/a&gt;
  </code></pre>
  
  <p>Please does anyone have any ideas about this issue I am having?</p>
  
  <hr>
  
  <p>The admin.show view </p>
  
  <pre><code>@extends('admin')
  
  @section('main')
      &lt;aside class="right-side"&gt;
          &lt;!-- Content Header (Page header) --&gt;
          &lt;section class="content-header"&gt;
              &lt;h1&gt;
                  Dashboard
                  &lt;small&gt;Control panel&lt;/small&gt;
              &lt;/h1&gt;
              &lt;ol class="breadcrumb"&gt;
                  &lt;li&gt;&lt;a href="/admin"&gt;&lt;i class="fa fa-dashboard"&gt;&lt;/i&gt; Home&lt;/a&gt;&lt;/li&gt;
                  &lt;li class="active"&gt;Dashboard&lt;/li&gt;
              &lt;/ol&gt;
          &lt;/section&gt;
  
          &lt;!-- Main content --&gt;
          &lt;section class="content"&gt;
  
              &lt;!-- Small boxes (Stat box) --&gt;
              &lt;div class="row"&gt;
                  &lt;div class="col-lg-3 col-xs-6"&gt;
                      &lt;!-- small box --&gt;
                      &lt;div class="small-box bg-green"&gt;
                          &lt;div class="inner"&gt;
                              &lt;h3&gt;
                                  {{--53&lt;sup style="font-size: 20px"&gt;%&lt;/sup&gt;--}}
                              &lt;/h3&gt;
                              &lt;p&gt;
                                  Statistics
                              &lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="icon"&gt;
                              &lt;i class="ion ion-stats-bars"&gt;&lt;/i&gt;
                          &lt;/div&gt;
                          &lt;a href="#" class="small-box-footer"&gt;
                              View Information &lt;i class="fa fa-arrow-circle-right"&gt;&lt;/i&gt;
                          &lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;&lt;!-- ./col --&gt;
                  &lt;div class="col-lg-3 col-xs-6"&gt;
                      &lt;!-- small box --&gt;
                      &lt;div class="small-box bg-yellow"&gt;
                          &lt;div class="inner"&gt;
                              &lt;h3&gt;
                                  {{--53--}}
                              &lt;/h3&gt;
                              &lt;p&gt;
                                  User Management
                              &lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="icon"&gt;
                              &lt;i class="ion ion-person-add"&gt;&lt;/i&gt;
                          &lt;/div&gt;
                          &lt;a href="/admin-user-management" class="small-box-footer"&gt;
                              Edit Details &lt;i class="fa fa-arrow-circle-right"&gt;&lt;/i&gt;
                          &lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;&lt;!-- ./col --&gt;
                  &lt;div class="col-lg-3 col-xs-6"&gt;
                      &lt;!-- small box --&gt;
                      &lt;div class="small-box bg-red"&gt;
                          &lt;div class="inner"&gt;
                              &lt;h3&gt;
                                  {{--65--}}
                              &lt;/h3&gt;
                              &lt;p&gt;
                                  Detailed Site Information
                              &lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="icon"&gt;
                              &lt;i class="ion ion-pie-graph"&gt;&lt;/i&gt;
                          &lt;/div&gt;
                          &lt;a href="#" class="small-box-footer"&gt;
                              View Data &lt;i class="fa fa-arrow-circle-right"&gt;&lt;/i&gt;
                          &lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;&lt;!-- ./col --&gt;
              &lt;/div&gt;&lt;!-- /.row --&gt;
  
              &lt;!-- top row --&gt;
              &lt;div class="row"&gt;
                  &lt;div class="col-xs-12 connectedSortable"&gt;
  
                  &lt;/div&gt;&lt;!-- /.col --&gt;
              &lt;/div&gt;
  
          &lt;/section&gt;&lt;!-- /.content --&gt;
          &lt;label&gt;{{$user-&gt;name}}&lt;/label&gt;
      &lt;/aside&gt;&lt;!-- /.right-side --&gt;
  @endsection
  </code></pre>
  
  <p>And then the admin.admin-user-management view which is using </p>
  
  <pre><code>@extends('admin')
  
  @section('main')
      &lt;aside class="right-side"&gt;
          &lt;!-- Content Header (Page header) --&gt;
          &lt;section class="content-header"&gt;
              &lt;h1&gt;
                  Dashboard
                  &lt;small&gt;Control panel&lt;/small&gt;
              &lt;/h1&gt;
              &lt;ol class="breadcrumb"&gt;
                  &lt;li&gt;&lt;a href="/admin"&gt;&lt;i class="fa fa-dashboard"&gt;&lt;/i&gt; Home&lt;/a&gt;&lt;/li&gt;
                  &lt;li class="active"&gt;Dashboard&lt;/li&gt;
              &lt;/ol&gt;
          &lt;/section&gt;
  
          &lt;!-- Main content --&gt;
          &lt;section class="content"&gt;
  
              &lt;!-- Small boxes (Stat box) --&gt;
              &lt;div class="row"&gt;
                  &lt;div class="col-lg-3 col-xs-6"&gt;
                      &lt;!-- small box --&gt;
                      &lt;div class="small-box bg-green"&gt;
                          &lt;div class="inner"&gt;
                              &lt;h3&gt;
                                  {{--53&lt;sup style="font-size: 20px"&gt;%&lt;/sup&gt;--}}
                              &lt;/h3&gt;
                              &lt;p&gt;
                                  Statistics
                              &lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="icon"&gt;
                              &lt;i class="ion ion-stats-bars"&gt;&lt;/i&gt;
                          &lt;/div&gt;
                          &lt;a href="#" class="small-box-footer"&gt;
                              View Information &lt;i class="fa fa-arrow-circle-right"&gt;&lt;/i&gt;
                          &lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;&lt;!-- ./col --&gt;
                  &lt;div class="col-lg-3 col-xs-6"&gt;
                      &lt;!-- small box --&gt;
                      &lt;div class="small-box bg-yellow"&gt;
                          &lt;div class="inner"&gt;
                              &lt;h3&gt;
                                  {{--53--}}
                              &lt;/h3&gt;
                              &lt;p&gt;
                                  User Management
                              &lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="icon"&gt;
                              &lt;i class="ion ion-person-add"&gt;&lt;/i&gt;
                          &lt;/div&gt;
                          &lt;a href="#" class="small-box-footer"&gt;
                              Edit Details &lt;i class="fa fa-arrow-circle-right"&gt;&lt;/i&gt;
                          &lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;&lt;!-- ./col --&gt;
                  &lt;div class="col-lg-3 col-xs-6"&gt;
                      &lt;!-- small box --&gt;
                      &lt;div class="small-box bg-red"&gt;
                          &lt;div class="inner"&gt;
                              &lt;h3&gt;
                                  {{--65--}}
                              &lt;/h3&gt;
                              &lt;p&gt;
                                  Detailed Site Information
                              &lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="icon"&gt;
                              &lt;i class="ion ion-pie-graph"&gt;&lt;/i&gt;
                          &lt;/div&gt;
                          &lt;a href="#" class="small-box-footer"&gt;
                              View Data &lt;i class="fa fa-arrow-circle-right"&gt;&lt;/i&gt;
                          &lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;&lt;!-- ./col --&gt;
              &lt;/div&gt;&lt;!-- /.row --&gt;
  
              &lt;!-- top row --&gt;
              &lt;div class="row"&gt;
                  &lt;div class="col-xs-12 connectedSortable"&gt;
  
                  &lt;/div&gt;&lt;!-- /.col --&gt;
              &lt;/div&gt;
  
          &lt;/section&gt;&lt;!-- /.content --&gt;
          &lt;div class="container-fluid"&gt;
              &lt;div class="form-box"&gt;
  
                  @if (session('message'))
                      &lt;div class="alert alert-info" style="text-align: center; width: 200px; "&gt;
                          {{ session('message') }}
                      &lt;/div&gt;
                  @endif
  
                  &lt;div class="container"&gt;
  
                      {{-- @if(Auth::user()) --}}
                      &lt;form class="form-group"&gt;
                          @if($users != null)
                              @foreach($users as $user)
                                  @if($user-&gt;admin != 'true')
                                      {!! Form::label($user-&gt;name) !!}
                                      &lt;div class="container"&gt;
                                          &lt;br&gt;
                                          &lt;a href="{{route('admin.show', ['id' =&gt; $user-&gt;id])}}" class="btn btn-primary"&gt;View all information&lt;/a&gt;
                                      &lt;/div&gt;
                                      &lt;/br&gt;
                                      &lt;div class="container"&gt;
                                          {{-- &lt;a href="{{route('house.edit',$house)}}" class="btn btn-primary"&gt;Update house details&lt;/a&gt; --}}
                                      &lt;/div&gt;
                                      &lt;br&gt;
  
                                      &lt;div class="container"&gt;
                                          {{-- {!! Form::open(['method' =&gt; 'DELETE', 'route'=&gt;['house.destroy', $house-&gt;id]]) !!} --}}
                                          {{-- {!! Form::submit('Delete House', ['class' =&gt; 'btn btn-danger']) !!} --}}
                                          {{-- {!! Form::close() !!} --}}
                                      &lt;/div&gt;
                                  @endif
                              @endforeach
                          @else
                              {{-- &lt;li&gt;&lt;a href={{url('/house/create')}}&gt;Add new house&lt;/a&gt;&lt;/li&gt; --}}
                          @endif
                      &lt;/form&gt;
                      {{-- @endif --}}
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/aside&gt;&lt;!-- /.right-side --&gt;
  @endsection
  </code></pre>
  
  <p>The routes.php file</p>
  
  <pre><code>//Admin Routes
  
  Route::get('/admin-user-management', 'AdminController@useraccounts');
  Route::resource('admin', 'AdminController');
  </code></pre>
  
  <p>Header</p>
  
  <pre><code>&lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Admin | Dashboard&lt;/title&gt;
      &lt;meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'&gt;
      &lt;!-- bootstrap 3.0.2 --&gt;
      &lt;link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /&gt;
      &lt;!-- font Awesome --&gt;
      &lt;link href="bootstrap/css/font-awesome.min.css" rel="stylesheet" type="text/css" /&gt;
      &lt;!-- Ionicons --&gt;
      &lt;link href="bootstrap/css/ionicons.min.css" rel="stylesheet" type="text/css" /&gt;
      &lt;!-- Morris chart --&gt;
      &lt;link href="bootstrap/css/morris/morris.css" rel="stylesheet" type="text/css" /&gt;
      &lt;!-- jvectormap --&gt;
      &lt;link href="bootstrap/css/jvectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" type="text/css" /&gt;
      &lt;!-- fullCalendar --&gt;
      &lt;link href="bootstrap/css/fullcalendar/fullcalendar.css" rel="stylesheet" type="text/css" /&gt;
      &lt;!-- Daterange picker --&gt;
      &lt;link href="bootstrap/css/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" /&gt;
      &lt;!-- bootstrap wysihtml5 - text editor --&gt;
      &lt;link href="bootstrap/css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css" rel="stylesheet" type="text/css" /&gt;
      &lt;!-- Theme style --&gt;
      &lt;link href="bootstrap/css/AdminLTE.css" rel="stylesheet" type="text/css" /&gt;
  
      &lt;!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --&gt;
      &lt;!-- WARNING: Respond.js doesn't work if you view the page via file:// --&gt;
      &lt;!--[if lt IE 9]&gt;
      &lt;script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"&gt;&lt;/script&gt;
      &lt;script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"&gt;&lt;/script&gt;
      &lt;![endif]--&gt;
  &lt;/head&gt;
  </code></pre>