2017-12-01 4 views
-1

これは、これはサイド・ナビゲーションである私のルートルートLaravelエラー

Route::get('/', '[email protected]'); 
Route::get('/index.html', '[email protected]'); 
Route::get('/checkout.html', '[email protected]'); 
Route::get('/furniture.html', '[email protected]'); 
Route::get('/login.html', '[email protected]'); 
Route::get('/products.html', '[email protected]'); 
Route::get('/register.html', '[email protected]'); 
Route::get('/single.html', '[email protected]'); 

Auth::routes(); 

Route::get('/home', '[email protected]')->name('home'); 

Route::group(['prefix' => 'admin','middleware'=>'auth'], function() { 
    Route::get('/', function() { 
     return view('admin.index'); 
    })->name('admin.index'); 

}); 

です:私はこの問題を持っているのはなぜ

{{-- Side Navigation --}} 
<div class="col-md-2"> 
    <div class="sidebar content-box" style="display: block;"> 
     <ul class="nav"> 
      <!-- Main menu --> 
      <li class="current"><a href="{{route('admin.index')}}"><i class="glyphicon glyphicon-home"></i> 
        Dashboard</a></li> 
      <li class="submenu"> 
       <a href="#"> 
        <i class="glyphicon glyphicon-list"></i> Products 
        <span class="caret pull-right"></span> 
       </a> 
       <!-- Sub menu --> 
       <ul> 
        <li><a href="{{route('admin.index')}}">Add Product</a></li> 
       </ul> 
      </li> 
     </ul> 
    </div> 
</div> <!-- ADMIN SIDE NAV--> 

これは

/** 
    * Get the URL to a named route. 
    * 
    * @param string $name 
    * @param mixed $parameters 
    * @param bool $absolute 
    * @return string 
    * 
    * @throws \InvalidArgumentException 
    */ 
    public function route($name, $parameters = [], $absolute = true) 
    { 
     if (! is_null($route = $this->routes->getByName($name))) { 
      return $this->toRoute($route, $parameters, $absolute); 
     } 

     throw new InvalidArgumentException("Route [{$name}] not defined."); 
    } 

ルート機能ですか?

ルート[product.index]は定義されていません。 (表示:C:\ Users \ Antonio \ Desktop \ uni \ musicshop \ resources \ views \ admin \ layout \ includes \ sidenav.blade.php) (表示:C:\ Users \ Antonio \ Desktop \ uni \ musicicshop \ resources \ views \ admin \ layout \ includes \ sidenav.blade.php)

は、これが問題のコードです:

enter image description here

+1

コードをアップロードしてください。コードの画像ではありません。 – castis

+1

私はコードをアップロードします@castis –

+0

あなたのルートを表示し、sidenav.blade.php – aynber

答えて

0

名前ルート

を設定する必要があります

ルート:: get( '/ products.html'、 'frontcontroller @ products') - >名前( 'product.index');