jeudi 21 juillet 2016

Laravel 5.2 - get images of item in blade view

My controller is:

public function index()

{

$details= Food::all();

return view('details.index', compact('details'));

}

public function show($Food_id)

{

 $detail=Food::findOrFail($Food_id);

 return view('details.show', compact('detail'));

}

My index.blade.php is:

<h1>Details</h1>

<hr/>  


@foreach($details as $detail)

<detail>

<h2>

<a href="/details/">

</a>

</h2>

</detail>

@endforeach

And my show.blade.php is:

 <h1 align="center"></h1>

<detail>

<h3><p>Name:</h3><h4></h4></p>

I want to show the images of food items that are stored in public/uploads folder.How I can get images to show them.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire