src/Tag.php
public static function findByNameOrCreate(string $name, string $locale = null, string $group = null): Tag
    {
        $locale = $locale ?? app()->getLocale();

        return static::findByName($name, $locale) ?: static::createByName($name, $locale, $group);
    }
public static function findByNameOrCreate(string $name, string $locale = null, string $group = null): Tag
    {
        $locale = $locale ?? app()->getLocale();

        return static::findByName($name, $locale) ?: static::createByName($name, $locale, $group);
    }
public static function findByNameOrCreate ( string $ name , string $ locale = null , string $ group = null ) : Tag { $ locale = $ locale ?? app ( ) -> getLocale ( ) ; return static :: findByName ( $ name , $ locale ) ? : static :: createByName ( $ name , $ locale , $ group ) ; }
Find tag by attribute or create if not exists.

@param mixed       $name
@param string|null $locale
@param string|null $group

@return static
Find tag by attribute or create if not exists .