title: Routing Error Due to a group prefix in my route
body: <p>In my routing if i remove the {page} prefix it works completely fine but when i put it i get an error. For other it is working fine but it is not working for this route: Route::get('/{categories}', 'AdminVisible\CostIncludeController@index');
  My AdminPageController:</p>
  <pre><code>    public function index($page)
      {
          $page = Page::where('Pages_Slug_Name',$page)-&gt;firstorFail();
          $pages = Page::all();
          return view('admin.pages.page',[
              'page' =&gt; $page,
          ],compact('pages'));
      }
  </code></pre>
  <p>My CostIncludeController:</p>
  <pre><code>    public function index($categories){
          $pages = Page::all();
          $packages = Package::where('slug',$categories)-&gt;first();
          return view('admin.pages.costinclude',[
              'packages' =&gt; $packages,
          ],compact('pages'));    
      }
  </code></pre>
  <p>My Route:</p>
  <pre><code>Auth::routes(['register' =&gt; false,'login' =&gt; false]);
  Route::prefix('admin')-&gt;group(function() {
      Route::get('/')-&gt;name('login')-&gt;uses('Auth\LoginController@showLoginForm');
      Route::post('/')-&gt;name('login')-&gt;uses('Auth\LoginController@login');
      Route::get('/dashboard', 'AdminVisible\HomeController@index')-&gt;name('admin.dashboard');
      Route::prefix('pages')-&gt;group(function() {
          Route::get('/','AdminVisible\AdminPageController@pages')-&gt;name('pages');
          Route::prefix('{page}')-&gt;group(function() {
              Route::get('/','AdminVisible\AdminPageController@index')-&gt;name('page');
              Route::get('/banner', 'AdminVisible\BannerController@index');
              Route::get('/why-with-us', 'AdminVisible\WhyWithUsController@index');
              Route::get('/testimonials', 'AdminVisible\TestimonialsController@index');
              Route::get('/about', 'AdminVisible\AboutController@index');
              Route::get('/about-why-with-us', 'AdminVisible\AboutWhyWithUsController@index');
              Route::get('/general-information', 'AdminVisible\PackageController@index');
              Route::get('/package-program', 'AdminVisible\PackageController@index');
              Route::get('/cost-exclude', 'AdminVisible\PackageController@index');
              Route::prefix('cost-include')-&gt;group(function() {
                  Route::get('/', 'AdminVisible\PackageController@index');
                  Route::get('/{categories}', 'AdminVisible\CostIncludeController@index');
              });
          });
      }); 
  });
  </code></pre>
  <p>My blade.php file:</p>
  <pre><code>@extends('layouts.app')
  @section('style')
      &lt;link href=&quot;{{ asset('css/Admin/sql-data-viewer.css') }}&quot; rel=&quot;stylesheet&quot;&gt;   
      &lt;style&gt;&lt;/style&gt;
  @endsection
  @section('content')
      &lt;section class=&quot;data-viewer&quot;&gt;
        &lt;div class=&quot;d-flex justify-content-between&quot;&gt;
          &lt;h3&gt;Select Package to change&lt;/h3&gt;
          &lt;a href=&quot;#&quot;&gt;&lt;button type=&quot;button&quot; class=&quot;btn add-data text-white rounded-pill&quot;&gt;Add &amp;nbsp;&lt;i class=&quot;fas fa-plus&quot;&gt;&lt;/i&gt;&lt;/button&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;table&gt;
            &lt;thead&gt;
                &lt;tr class=&quot;data-head&quot;&gt;  
                  &lt;td scope=&quot;col&quot; style=&quot;width: 5%&quot;&gt;&lt;input type=&quot;checkbox&quot;&gt;&lt;/td&gt;
                  &lt;th scope=&quot;col&quot; style=&quot;width: 8.7%&quot;&gt;Id&lt;/th&gt;
                  &lt;td scope=&quot;col&quot;&gt;Includes&lt;/td&gt; 
                &lt;/tr&gt;
            &lt;/thead&gt;
            &lt;tbody&gt;
              @foreach ($packages-&gt;costIncludes as $include)
                &lt;tr class=&quot;data&quot;&gt;
                  &lt;td scope=&quot;col&quot; style=&quot;width: 6.5%&quot;&gt;&lt;input type=&quot;checkbox&quot;&gt;&lt;/td&gt;
                  &lt;th scope=&quot;col&quot; style=&quot;width: 10%;&quot;&gt;&lt;a href=&quot;&quot;&gt;{{$include-&gt;id}}&lt;/a&gt;&lt;/th&gt;
                  &lt;td scope=&quot;col&quot; class=&quot;text-justify&quot; style=&quot;width:696px&quot;&gt;{{Str::limit($include-&gt;Cost_Include,100)}}&lt;/td&gt; 
                &lt;/tr&gt;                                
                  @endforeach
            &lt;/tbody&gt;
        &lt;/table&gt;
  
      &lt;/section&gt;
  @endsection
  </code></pre>
  <p>With {page} prefix:</p>
  <p><a href="https://i.stack.imgur.com/ghQHG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ghQHG.png" alt="enter image description here" /></a></p>
  <p>Without {page} prefix:</p>
  <p><a href="https://i.stack.imgur.com/Sz6aP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Sz6aP.png" alt="enter image description here" /></a></p>
  <p>With {page} prefix when i do dd():
  <a href="https://i.stack.imgur.com/h5yzu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h5yzu.png" alt="enter image description here" /></a></p>
  <p>Without {page} prefix when i do dd():
  <a href="https://i.stack.imgur.com/8jQOT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8jQOT.png" alt="enter image description here" /></a></p>