protected function getSite($sites, $site_id)
    {
        $site_found = collect($sites)->filter(function ($site) use ($site_id) {
            return $site->id === $site_id;
        })->first();

        if ($site_found) {
            return $site_found;
        }
        return null;
    }
protected function getSite($sites, $site_id)
    {
        $site_found = collect($sites)->filter(function ($site) use ($site_id) {
            return $site->id === $site_id;
        })->first();

        if ($site_found) {
            return $site_found;
        }
        return null;
    }
protected function getSite ( $ sites , $ site_id ) { $ site_found = collect ( $ sites ) -> filter ( function ( $ site ) use ( $ site_id ) { return $ site -> id === $ site_id ; } ) -> first ( ) ; if ( $ site_found ) { return $ site_found ; } return null ; }
Get forge site from sites.

@param $sites
@param $site_id
@return mixed
Get forge site from sites .