title: Laravel: Action @index not defined
body: <blockquote>
  <p>InvalidArgumentException Action BookingController@index not defined.</p>
  </blockquote>
  <p>In my web.php I have used the following code:</p>
  <pre><code>Route::resource('bookings', 'App\Http\Controllers\BookingController');
  </code></pre>
  <p>I've also tried the following:</p>
  <pre><code>Route::resource('bookings', 'App\Http\Controllers\BookingController@index');
  </code></pre>
  <p>Full code of web.php: <a href="https://pastebin.com/SGGr3uAm" rel="nofollow noreferrer">https://pastebin.com/SGGr3uAm</a></p>
  <p>In my BookingController.php (relevant code):</p>
  <pre><code>    public function index()
      {
          $bookings = DB::table('bookings')-&gt;get();
          return view('bookings.index')
          -&gt;with('bookings', $bookings);
      }
  
      public function store(Request $request)
      {
          $id = DB::table('bookings')-&gt;insertGetId([
              'room_id' =&gt; $request-&gt;input('room_id'),
              'start' =&gt; $request-&gt;input('start'),
              'end' =&gt; $request-&gt;input('end'),
              'is_reservation' =&gt; $request-&gt;input('is_reservation', false),
              'is_paid' =&gt; $request-&gt;input('is_paid', false),
              'notes' =&gt; $request-&gt;input('notes'),
  
          ]);
          DB::table('bookings_users')-&gt;insert([
          'booking_id' =&gt; $id,
          'user_id' =&gt; $request-&gt;input('user_id'),
  
          ]);
          return redirect()-&gt;route('BookingController@index');
      }
  
  
      public function update(Request $request, Booking $booking)
      {
          DB::table('bookings')
          -&gt;where('id', $booking-&gt;id)
          -&gt;update([
              'room_id' =&gt; $request-&gt;input('room_id'),
              'start' =&gt; $request-&gt;input('start'),
              'end' =&gt; $request-&gt;input('end'),
              'is_reservation' =&gt; $request-&gt;input('is_reservation', false),
              'is_paid' =&gt; $request-&gt;input('is_paid', false),
              'notes' =&gt; $request-&gt;input('notes'),
  
          ]);
          DB::table('bookings_users')
          -&gt;where('booking_id', $booking-&gt;id)
          -&gt;update([
          'user_id' =&gt; $request-&gt;input('user_id'),
  
          ]);
          return redirect()-&gt;route('BookingController@index');
      }
  
      public function destroy(Booking $booking)
      {
          DB::table('bookings_users')-&gt;where('booking_id', $booking-&gt;id)-&gt;delete();
          $booking-&gt;delete();
          return redirect()-&gt;action('BookingController@index');
  
      } }
  </code></pre>
  <p>Full code of BookingController.php: <a href="https://pastebin.com/TyXpdpH6" rel="nofollow noreferrer">https://pastebin.com/TyXpdpH6</a></p>
  <p>I'm using Laravel 8.19.0</p>
  <p>php artisan route:list
  <a href="https://i.stack.imgur.com/pTDMA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pTDMA.png" alt="enter image description here" /></a>
  What could be the issue? Thanks!!</p>