vendredi 20 mai 2016

Laravel Namespacing Path in The View

I was wondering is it bad practice to be doing this in our views?

@foreach(Session::get('cart') as $item)
  
@endforeach

Should the controller be doing this work and then passing the data back to the view or is it okay to just handle this in the view? Any best practice advice?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire