protected function getSiteByName($sites, $site_name)
    {
        $site_found = collect($sites)->filter(function ($site) use ($site_name) {
            return $site->name === $site_name;
        })->first();

        if ($site_found) {
            return $site_found;
        }
        return null;
    }
protected function getSiteByName($sites, $site_name)
    {
        $site_found = collect($sites)->filter(function ($site) use ($site_name) {
            return $site->name === $site_name;
        })->first();

        if ($site_found) {
            return $site_found;
        }
        return null;
    }
protected function getSiteByName ( $ sites , $ site_name ) { $ site_found = collect ( $ sites ) -> filter ( function ( $ site ) use ( $ site_name ) { return $ site -> name === $ site_name ; } ) -> first ( ) ; if ( $ site_found ) { return $ site_found ; } return null ; }
Get forge site from sites by name.

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