public function siteCampagnes($site_id)
    {
        if(config('newsletter.multi')) {
            $newsletters = $this->newsletter->getSite($site_id);
            return $newsletters->map(function ($newsletter, $key) {
                return $newsletter->campagnes;
            })->flatten(1);
        }

        return null;
    }
public function siteCampagnes($site_id)
    {
        if(config('newsletter.multi')) {
            $newsletters = $this->newsletter->getSite($site_id);
            return $newsletters->map(function ($newsletter, $key) {
                return $newsletter->campagnes;
            })->flatten(1);
        }

        return null;
    }
public function siteCampagnes ( $ site_id ) { if ( config ( 'newsletter.multi' ) ) { $ newsletters = $ this -> newsletter -> getSite ( $ site_id ) ; return $ newsletters -> map ( function ( $ newsletter , $ key ) { return $ newsletter -> campagnes ; } ) -> flatten ( 1 ) ; } return null ; }
All campagnes for site
All campagnes for site