title: laravel 5 urlgenerator with Form::open route with Route Annotations
body: <p>I'm using <strong>Laravel 5</strong> with <strong><em>Route Annotations</em></strong>. (The app\Http\route.php will be automaticaly deleted). For video about Route Annotations, you may have a look at <a href="https://www.youtube.com/watch?v=sOvgw40Dg4A" rel="nofollow">https://www.youtube.com/watch?v=sOvgw40Dg4A</a></p>
  
  <p>I build  a <strong><em>ContactController.php</em></strong> with <strong><em>php artisan make:controller ContactController</em></strong></p>
  
  <p>And at <strong><em>store()</em></strong> function, I add <strong><em>return view('pages.contact');</em></strong> to re-input another contact data.</p>
  
  <p>When I give the script below on my pages\contact.blade.php : </p>
  
  <pre><code>{!! Form::open(['route'=&gt;'contact.store']) !!}
  </code></pre>
  
  <p>It allways return error as below : </p>
  
  <pre><code>ErrorException in UrlGenerator.php line 237: Route [contact.store] not defined. (View: D:\www\mycontact\resources\views\pages\contact.blade.php)
  </code></pre>
  
  <p>which refer to : </p>
  
  <blockquote>
  <pre><code>public function route($name, $parameters = array(), $absolute = true)
  {
    if ( ! is_null($route = $this-&gt;routes-&gt;getByName($name)))
    {
        return $this-&gt;toRoute($route, $parameters, $absolute);
    }
  
    throw new InvalidArgumentException("Route [{$name}] not defined.");
  }
  </code></pre>
  </blockquote>
  
  <p>But when I change into : </p>
  
  <pre><code>{!! Form::open(['url'=&gt;'contact']) !!}
  </code></pre>
  
  <p>it works normally.</p>
  
  <p>How to fix my laravel so I can use the route ?</p>
  
  <p>Below are the things that I have done : </p>
  
  <pre><code>composer require illuminate/html
  </code></pre>
  
  <p>At config\app.php , I add : <strong><em>'Form'       => 'Illuminate\Html\FormFacade'</em></strong> so I can use the {!! Form:: !!}</p>
  
  <p>Then I execute the following command : </p>
  
  <pre><code>composer update
  composer dump-autoload 
  php artisan dump
  php artisan clear-compiled
  php artisan dump-autoload
  php artisan optimize
  php artisan route:clear
  php artisan route:scan
  php artisan route:list 
  </code></pre>
  
  <p>So... How to fix my laravel so in my blade, I can use <strong><em>{!! Form::open(['route'=>'contact.store']) !!}</em></strong> instead <strong><em>{!! Form::open(['url'=>'contact']) !!}</em></strong> ?</p>
  
  <p>PS: 
  I use XAMPP on Windows 7 Pro 64bit.
  And I already read : <a href="http://laravel.io/forum/10-11-2014-forms-doesnt-work-in-laravel-5" rel="nofollow">http://laravel.io/forum/10-11-2014-forms-doesnt-work-in-laravel-5</a></p>
  
  <p>For my steps on Route Annotations, at App\Providers\RouteServiceProvider.php , I add my controllers with in </p>
  
  <pre><code>protected $scan = [
    'App\Http\Controllers\HomeController', // for http://localhost/myl5/
    'App\Http\Controllers\ContactController',  //  for http://localhost/myl5/contact
  ];
  </code></pre>