title: Laravel 4 - Call to undefined method MyController::getAfterFilters()
body: <p>In a Laravel 4 app, when I try and access the URI, <a href="http://app.dev/groups" rel="nofollow">http://app.dev/groups</a>, I receive the following error:</p>
  
  <pre><code>`Call to undefined method GroupsController::getAfterFilters()`
  </code></pre>
  
  <p>The error implies the problem is with my app/filters.php file, so let's review that first.</p>
  
  <pre><code>App::before(function($request)
  {
      //
  });
  
  App::after(function($request, $response)
  {
      //
  });
  
  Route::filter('auth', function()
  {
      if (Auth::guest()) return Redirect::route('users/login');
  });
  
  Route::filter('guest', function()
  {
      if (Auth::check()) return Redirect::route('users/profile');
  });
  </code></pre>
  
  <p>That's all straightforward. The Auth filter works properly for all of the other routes, so I don't see that being related to the issue. Next up, let's inspect the route:</p>
  
  <pre><code>Route::group(["before" =&gt; "auth"], function()
  {
       // ...
  
       Route::resource('groups', 'GroupsController');
  
       // ...
  }
  </code></pre>
  
  <p>All of the other routes (Route::get and Route::resource) work with out an issue. So, that doesn't appear to be the problem. Even more perplexing, when I renamed the MVC and route from <code>GroupsController</code> to <code>BillingController</code>, it all worked including rendering the views.  So, I thought the issue was resolved. However, I still need a <code>GroupsController</code>, so I created all the files from scratch and when I went to go load the URI, I received the same error message again.</p>
  
  <p>I've attempted <code>php artisan cache:clear</code>, <code>composer dump-autoload</code>, and clearing my browser's cache in hopes that it would flush the error, but I still receive the same error message.</p>
  
  <p>The only "suggestion" I found searching Google was to just do a fresh install of a Laravel app and it will work. That's fine if you are in the beginning stages of development, but I've got a fair amount of code written and configuration files that are setup around this environment. With that being said, I'd much rather find, and resolve, the underlying issue.</p>
  
  <p>I'd like to hear your suggestions to help troubleshoot the underlying problem and resolve it. TIA.</p>
  
  <hr>
  
  <h2>Note:</h2>
  
  <p>I've removed the placeholder App::before and App::after method calls from the filters.php file just to see if it was causing a conflict, and as expected, it did not make a difference.</p>
  
  <p>In my Laravel installation, under <code>/vendors/laravel/framework/src/Illuminate/Foundation/Console/RoutesCommand.php</code>, on line 193 the method <code>getAfterFilters</code> is defined:</p>
  
  <pre><code>    protected function getAfterFilters($route)
  {
      return implode(', ', array_keys($route-&gt;afterFilters()));
  }
  </code></pre>
  
  <p>All of this should be loaded as part of the default Laravel installation. As one commentor mentioned, this does sound like an installation gone wrong. However, it has worked fine for everything else, so I am quite perplexed to why it is only happening with this one resource.</p>
  
  <p>I'm going to keep digging into it. Feel free to keep posting suggestions.</p>
  
  <p>And, thank you for your time. </p>