private function fetchLocales($available = true)
    {
        $available_locales = $this->getAvailableLocales();
        $current_locales = $this->translations()->lists('locale')->toArray();

        return array_filter($available_locales, function ($v) use ($current_locales, $available) {
            return $available ? in_array($v, $current_locales) : !in_array($v, $current_locales);
        }, ARRAY_FILTER_USE_BOTH);
    }
private function fetchLocales($available = true)
    {
        $available_locales = $this->getAvailableLocales();
        $current_locales = $this->translations()->lists('locale')->toArray();

        return array_filter($available_locales, function ($v) use ($current_locales, $available) {
            return $available ? in_array($v, $current_locales) : !in_array($v, $current_locales);
        }, ARRAY_FILTER_USE_BOTH);
    }
private function fetchLocales ( $ available = true ) { $ available_locales = $ this -> getAvailableLocales ( ) ; $ current_locales = $ this -> translations ( ) -> lists ( 'locale' ) -> toArray ( ) ; return array_filter ( $ available_locales , function ( $ v ) use ( $ current_locales , $ available ) { return $ available ? in_array ( $ v , $ current_locales ) : ! in_array ( $ v , $ current_locales ) ; } , ARRAY_FILTER_USE_BOTH ) ; }
Get all locales associated with this entity

@param bool $available
@return array
Get all locales associated with this entity