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
!
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2sa9uO3
via IFTTT
Aucun commentaire:
Enregistrer un commentaire