public static function createInLocale($locale, array $attributes = [], $translations = [])
    {
        $model = (new static($attributes))->setLocale($locale);

        if ($model->save() && is_array($translations)) {
            $model->saveTranslations($translations);
        }

        return $model;
    }
public static function createInLocale($locale, array $attributes = [], $translations = [])
    {
        $model = (new static($attributes))->setLocale($locale);

        if ($model->save() && is_array($translations)) {
            $model->saveTranslations($translations);
        }

        return $model;
    }
public static function createInLocale ( $ locale , array $ attributes = [ ] , $ translations = [ ] ) { $ model = ( new static ( $ attributes ) ) -> setLocale ( $ locale ) ; if ( $ model -> save ( ) && is_array ( $ translations ) ) { $ model -> saveTranslations ( $ translations ) ; } return $ model ; }
Save a new model in provided locale and return the instance.

@param string $locale
@param array $attributes
@param array|string $translations
@return static
Save a new model in provided locale and return the instance .