mardi 1 mars 2016

Passing data from blade to route

I'm trying to list articles from database then show details of the article when the user clicks on it. How can I pass the article id or name to the route/controller to display the details? I tried butting the id in the href but I don't know how to handle it from routes!

this is the articles list:

@foreach ($articles as $article)
    <div class="panel-body">
        <a href="#">{{$article->name}}</a>
    </div>
@endforeach

where do I go from here?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire