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
syncCategories(array $categories, string|null $class = null)

Generic method that synchronizes the categories of a model

from  Model
Collection
categories()

Generic method that returns the categories of a model

from  Model
static string
get()

Get the active language.

static bool
set(string $new)

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

in Model at line 70
syncCategories(array $categories, string|null $class = null)

Generic method that synchronizes the categories of a model

Parameters

array $categories
string|null $class

in Model at line 79
Collection categories()

Generic method that returns the categories of a model

Return Value

Collection

of categories

at line 19
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 44
static bool set(string $new)

Set the active language.

Updates session, cookies, environment, and locale.

Parameters

string $new

The new language code to set.

Return Value

bool

True if the language was set successfully.