title: Laravel: Route [users.edit] not defined
body: <p>I have created a demo application in Laravel 4, for some learning experience. The routes.php is as follows:</p>
  
  <pre><code>Route::get('/', function()
  {
      return View::make('hello');
  });
  
  Route::group(['prefix' =&gt; 'users', 'before' =&gt; 'auth'], function () {
  Route::get('dashboard', function () {
      $layout = View::make('users.dashboard');
      $layout-&gt;title = "Dashboard";
      $layout-&gt;content = View::make('users.dashboard');       
      return $layout;
  }); 
  Route::get('/all/', [ 'as' =&gt; 'users.index', 'uses' =&gt; 'UserController@all']);
  Route::get('/create/', [ 'as' =&gt; 'users.create', 'uses' =&gt; 'UserController@create']);
  Route::get('users/login', [ 'as' =&gt; 'users.login', 'uses' =&gt; 'UserController@getLogin']);
  Route::post('users/login', [ 'as' =&gt; 'users.login', 'uses' =&gt; 'UserController@postSignin']);
  Route::get('users/logout', [ 'as' =&gt; 'users.logout', 'uses' =&gt; 'UserController@getLogout']);
  Route::resource('/','UserController');
  });
  
  Route::controller('users', 'UserController');
  </code></pre>
  
  <p>Here, I prefixed the "users". However, Trying logging in with/out correct login details, it shows only the login page instead of showing up the error message on the login page or dashboard. </p>
  
  <p>Any suggestion? FYI,</p>
  
  <p>The index.blade.php in app\views\users is below:</p>
  
  <pre><code>@extends('users.user') 
  @section('title', 'User Listing Page')
  @section('description', 'This is the user listing page')
  @section('main')
  
  &lt;h1&gt;All Users&lt;/h1&gt;
  
  &lt;p&gt;{{ link_to_route('users.create', 'Add new user') }}&lt;/p&gt;
  
  &lt;h1&gt;Login&lt;/h1&gt;
  &lt;p&gt;{{ link_to_route('users.login', 'Login') }}&lt;/p&gt; 
  
  &lt;table&gt;
  
      &lt;tr&gt;
  
          &lt;td&gt;{{ $users-&gt;links() }}&lt;/td&gt;
  
      &lt;/tr&gt;       
  
  &lt;/table&gt;
  
  
  @if ($users-&gt;count())
  &lt;table class="table table-striped table-bordered"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
      &lt;th&gt;Username&lt;/th&gt;
      &lt;th&gt;Email&lt;/th&gt;
      &lt;th&gt;Phone&lt;/th&gt;
      &lt;th&gt;Name&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
  
      &lt;tbody&gt;
          @foreach ($users as $user)
              &lt;tr&gt;
        &lt;td&gt;{{ $user-&gt;username }}&lt;/td&gt;
        &lt;td&gt;{{ $user-&gt;email }}&lt;/td&gt;
        &lt;td&gt;{{ $user-&gt;phone }}&lt;/td&gt;
        &lt;td&gt;{{ $user-&gt;name }}&lt;/td&gt;
        &lt;td&gt;{{ link_to_route('users.edit', 'Edit', array($user-&gt;id), array('class' =&gt; 'btn btn-info')) }}&lt;/td&gt;
        &lt;td&gt;{{ Form::open(array('method' =&gt; 'DELETE', 'route' =&gt; array('users.destroy', $user-&gt;id))) }}
        {{ Form::submit('Delete', array('class' =&gt; 'btn btn-danger')) }}
                      {{ Form::close() }}
                  &lt;/td&gt;
              &lt;/tr&gt;
          @endforeach
  
  
  
      &lt;/tbody&gt;
  
  &lt;/table&gt;
  
  &lt;table&gt;
  
      &lt;tr&gt;
  
          &lt;td&gt;{{ $users-&gt;links() }}&lt;/td&gt;
  
      &lt;/tr&gt;       
  
  &lt;/table&gt;
  
  @else
      There are no users
  @endif
  
  @stop
  </code></pre>
  
  <p>The script login.blade.php (on the same location as above) as follows:</p>
  
  <pre><code>@extends('users.user') 
  
  @section('main')
  
  &lt;h1&gt;Login&lt;/h1&gt;
  
  {{ Form::open(array('route' =&gt; 'users.login')) }}
  
  &lt;ul&gt;
  
  
      &lt;li&gt;
          {{ Form::label('username', 'Username:') }}
          {{ Form::text('username') }}
      &lt;/li&gt;
  
      &lt;li&gt;
          {{ Form::label('password', 'Password:') }}
          {{ Form::password('password') }}
      &lt;/li&gt;
  
  
      &lt;li&gt;
          {{ Form::submit('Submit', array('class' =&gt; 'btn')) }}
      &lt;/li&gt;
  &lt;/ul&gt;
  {{ Form::close() }}
  
  @if ($errors-&gt;any())
  &lt;ul&gt;
      {{ implode('', $errors-&gt;all('&lt;li class="error"&gt;:message&lt;/li&gt;')) }}
  &lt;/ul&gt;
  @endif
  
  @stop
  </code></pre>