Property | Type | Description | |
---|---|---|---|
$cache | |||
$hasNew | |||
$locale | |||
$table | The database table used by the model. | ||
$timestamps | Indicates if the model should be timestamped. | ||
$url |
Property | Type | Description | |
---|---|---|---|
$guarded | Guarded fields | ||
$jsonable | List of attribute names which are json encoded and decoded from the database. |
Method | Description | |
---|---|---|
forLocale ( string $locale = null, $default = null ) : string | Gets a message for a given locale, or the default. | |
get ( string $messageId ) : string | Creates or finds an untranslated message string. | |
getContentAttribute ( ) : string | Returns the value for the active locale. | |
importMessageCodes ( array $messages, string $locale = null ) : void | Import an array of messages. Only known messages are imported. | |
importMessages ( array $messages, string $locale = null ) : void | Import an array of messages. Only known messages are imported. | |
saveToCache ( ) : void | Save context messages to cache. | |
setContext ( string $locale, string $url = null ) | Set the caching context, the page url. | |
toLocale ( string $locale = null, string $message ) : void | Writes a translated message to a locale. | |
trans ( string $messageId, array $params = [] ) : string | Looks up and translates a message by its string. |
Method | Description | |
---|---|---|
makeCacheKey ( ) : string | Creates a cache key for storing context messages. | |
makeMessageCode ( string $messageId ) : string | Creates a sterile key for a message. |
public getContentAttribute ( ) : string | ||
return | string |
protected static makeCacheKey ( ) : string | ||
return | string |
protected static makeMessageCode ( string $messageId ) : string | ||
$messageId | string | |
return | string |
public static saveToCache ( ) : void | ||
return | void |
public static setContext ( string $locale, string $url = null ) | ||
$locale | string | |
$url | string |
protected $jsonable |