mardi 28 novembre 2017

Laravel - Passing a Count from a Relationship on a "Simple" Page

I was curious if it was possible to pass along a count of a relationship from a controller and put it on a simple page like a home page (which isn't specifically related to any specific model or controller). So say a user hasMany shipments, how can I pass along the count to the page?

I know how to pass along variables to model specific pages (such as show, edit, index and such pages), but not a general pages such as a home page or about page. I'm sorry if I am a bit oblivious on this topic, but I'm not sure where at all to go about with this.

Thanks! Matt



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

Aucun commentaire:

Enregistrer un commentaire