2015-05-08 126 views

回答

0

ü需要用行動展現在ProductController的,並通過ID

public function show($id) 
    { 
     $product= Product::findOrFail($id); 
     return View('product.show')->with('product',$product); 
    } 
現在

鑑於使鏈接,你寄的產品你的ID

<a href="{{ action('[email protected]', [$product->id]) }}">{{ $product->name}}</a> 

然後在你的節目中查看通話atributes PROM選擇產品

<h3>{!! $product->name!!}</h3> 
    <h3>{!! $product->price!!}</h3> 
... 
相關問題