title: Laravel controller function not found
body: <p>Currently I'm working with laravel. When I want to acces a controller through the view. I receive the error that my method is not found. </p>
  
  <blockquote>
    <p>Action App\Http\Controllers\RidesController@edit not defined. (View:
    C:\wamp\www\resources\views\rides\rides.blade.php)</p>
  </blockquote>
  
  <p>But when I try the index method it works strange enough? What should I do?</p>
  
  <p>This is my rides.blade.php:</p>
  
  <pre><code>  &lt;/thead&gt;
                              &lt;tbody&gt;
                                   &lt;tbody&gt;
                                      @foreach($rides as $ride)
                                       &lt;tr&gt;
                                          &lt;td&gt;&lt;a href="{!! action('RidesController@edit',$ride-&gt;id) !!}"&gt;{!! $ride-&gt;id !!}&lt;/a&gt; &lt;/td&gt;
                                          &lt;td&gt;{!! $ride-&gt;created_at !!}&lt;/td&gt;
                                          &lt;td&gt;{!! $ride-&gt;beginstand !!}&lt;/td&gt;
                                          &lt;td&gt;{!! $ride-&gt;eindstand !!}&lt;/td&gt;
                                          &lt;td&gt;{!! $ride-&gt;van !!}&lt;/td&gt;
                                          &lt;td&gt;{!! $ride-&gt;naar !!}&lt;/td&gt;
                                          &lt;td&gt;{!! $ride-&gt;bezoekadres !!}&lt;/td&gt;
                                          &lt;td&gt;{!! $ride-&gt;geredenroute !!}&lt;/td&gt;
                                          &lt;td&gt;{!! $ride-&gt;karakterrit !!}&lt;/td&gt;
                                          &lt;td&gt;{!! $ride-&gt;toelichting !!}&lt;/td&gt;
                                          &lt;td&gt;{!! $ride-&gt;kilometerszakelijk !!}&lt;/td&gt;
                                          &lt;td&gt;{!! $ride-&gt;kilometersprive !!}&lt;/td&gt;
                                      &lt;/tr&gt;
                                       @endforeach
                                  &lt;/tbody&gt;    
  </code></pre>
  
  <p>And my routes controller:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\Http\Requests;
  use App\Http\Controllers\Controller;
  use App\models\ridesregistration;
  use App\Http\Requests\RideFormRequest;
  
  class RidesController extends Controller
  {
      public function index()
      {
          $rides = ridesregistration::all();
          return view("rides.rides",compact('rides'));
      }
  
      public function create() 
      {
          return view('rides.create');
      }
  
      public function store(rideFormRequest $request)
      {
          $rides = new ridesregistration(array(
              'beginstand' =&gt;$request-&gt;get('beginstand'),
              'eindstand' =&gt;$request-&gt;get('eindstand'),
              'van' =&gt;$request-&gt;get('van'),
              'naar' =&gt;$request-&gt;get('naar'),
              'bezoekadres' =&gt;$request-&gt;get('bezoekadres'),
              'geredenroute' =&gt;$request-&gt;get('geredenroute'),
              'karakterrit' =&gt;$request-&gt;get('karakterrit'),
              'toelichting' =&gt;$request-&gt;get('toelichting'),
              'kilometerszakelijk' =&gt;$request-&gt;get('kilometerszakelijk'),
              'kilometersprive' =&gt;$request-&gt;get('kilometersprive')
              ));
          $rides-&gt;save();
          return redirect('/maakrit')-&gt;with('message','Rit '.$rides-&gt;id.' is succesvol aangemaakt.');
      }
  
      public function edit($id)
      {
          $rides = ridesregistration::whereId($id)-&gt;firstOrFail();
          return view('rides.edit',compact('rides','rides'));
      }
  }
  </code></pre>