Is there anyway to remove to foreach
from this code?
$user = \Auth::user();
foreach ($user->categories as $category) {
$channels[] = $category->channel();
}
return $channels;
I want to use the paginate function but it's not possible with the foreach
!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire