title: NotFoundHttpException in RouteCollection.php line 161 while passing value from blade to controller in laravel
body: <p>I'm having a problem with passing the variables from view to controller and retrieving mail using IMAP in Laravel. I'm getting <code>NotFoundHttpException</code> in RouteCollection.php line 161.</p>
  
  <p>Heres my code:</p>
  
  <p>Blade:</p>
  
  <pre><code>&lt;td class="col-name"&gt;
      &lt;a href="/admin-message/{{$count}}" class="col-name"&gt;{{ $head['from'] }}&lt;/a&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>Routes:</p>
  
  <pre><code>    Route::get('/', function () {
      return view('home');
  });
  Route::get('home', 'HomeController@index');
  Route::get('about', 'AboutController@index');
  Route::get('contact', 'ContactController@index');
  Route::get('services', 'ServicesController@index');
  
  //mailer routes admin
  
  
  Route::get('all-mail', 'AllMailController@index')-&gt;middleware('auth');
  Route::get('all-sent', 'AllSentController@index')-&gt;middleware('auth');
  Route::get('admin-mail', 'AdminMailController@index')-&gt;middleware('auth');
  Route::get('admin-message','AdminMessageController@index');
  Route::get('admin-message/{$count}','AdminMessageController@index');
  
  
  Route::get('admin-compose', 'AdminComposeController@index')-&gt;middleware('auth');
  Route::get('admin-sent', 'AdminSentController@index')-&gt;middleware('auth');
  Route::get('admin-draft', 'AdminDraftController@index')-&gt;middleware('auth');
  
  Route::auth();
  
  Route::get('/dashboard', 'DashboardController@index')-&gt;middleware('auth');
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>class AdminMessageController extends Controller {
      public function index($count) {
          $counts = Counts where::(['id'=&gt;$count]);
          $user = Auth::user();
          $email = $user-&gt;email;
          $pass = $user-&gt;pass;
  
          $mailbox = new ImapMailbox('{not.to.show.net:993/imap/ssl/validate-cert}INBOX', $email, $pass, __DIR__);
  
          $in = array();
          date_default_timezone_set("Asia/Manila");
          $head = $mailbox-&gt;getHeader($count)-&gt;Date;
          $unixTimestamp=strtotime($head);
          $date = date("M-d g:iA", $unixTimestamp);
          $in[] = array (
              'from'    =&gt; $mailbox-&gt;getHeader($counts['id'])-&gt;fromaddress,
              'subject' =&gt; $mailbox-&gt;getHeader($counts['id'])-&gt;subject,
              'date'    =&gt; $date,
          );
          return view('admin-message')-&gt;with('in',$in);
      }
  }
  </code></pre>