class Language extends Model

Properties

protected $casts from  Model
protected $connection from  Model
static string|null $active_language

The currently active language.

Methods

static 
boot()

No description

from  Model
_delete(string|null $date = null, string $connection = "tenant")

Illuminate\Database\Eloquent\SoftDeletes updates deleted_at only See main/System/Observers/ModelsObserver.php deleting()

from  Model
static An
findOr404(int|string $id)

Finds a model or response with 404

from  Model
User
user()

General method that returns the model user

from  Model
User
creationUser()

Generic method that returns the user who created the record

from  Model
static 
init()

Initializes the language setting the memorized language and start translator.

static string
get()

Get the active language.

static 
set(string $new, bool $skip_cookie = false)

Set the active language.

Details

in Model at line 14
static protected boot()

No description

in Model at line 23
_delete(string|null $date = null, string $connection = "tenant")

Illuminate\Database\Eloquent\SoftDeletes updates deleted_at only See main/System/Observers/ModelsObserver.php deleting()

Parameters

string|null $date
string $connection

in Model at line 40
static An findOr404(int|string $id)

Finds a model or response with 404

Parameters

int|string $id

The model id

Return Value

An

object that represents the model

in Model at line 51
User user()

General method that returns the model user

Return Value

User

in Model at line 60
User creationUser()

Generic method that returns the user who created the record

Return Value

User

at line 16
static init()

Initializes the language setting the memorized language and start translator.

at line 27
static string get()

Get the active language.

Determines the language from cookie, HTTP header, or default config.

Return Value

string

The active language code.

at line 53
static set(string $new, bool $skip_cookie = false)

Set the active language.

Updates session, cookies, environment, and locale.

Parameters

string $new

The new language code to set.

bool $skip_cookie

Whether to skip setting the cookie. Defaults to false. If used inside loops prevents buffer filling and causing the application to crash.