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?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1oO5Fti
via IFTTT

Aucun commentaire:

Enregistrer un commentaire