class Customer extends User

Traits

Properties

protected array $casts The attributes that should be cast to native types.
protected array $appends The accessors to append to the model's array form.
protected array $hidden The attributes that should be hidden for arrays.

Methods

bankAccounts()

Get the users bank accounts.

company()

Get the company.

string
getCompanyNameAttribute()

Get the company name.

contacts()

Get the contacts.

void
verify()

Verify the user.

void
requestVerification()

Request to be verified.

bool
isVerified()

Check if the user has been verified.

Builder
scopeVerified(Builder $query)

Scope a query to only include verified users.

static void
boot()

The "booting" method of the model.

string
getTypeAttribute()

Get the user type.

setPasswordAttribute(string $value)

Set the users password.

addresses()

Get the customers addresses.

cart()

The customers cart.

State
state()

Get the users state.

favourites()

Get the customers favourite products.

Details

in HasBankAccounts at line 10
bankAccounts()

Get the users bank accounts.

in HasCompany at line 10
company()

Get the company.

in HasCompany at line 20
string getCompanyNameAttribute()

Get the company name.

Return Value

string

in HasContacts at line 10
contacts()

Get the contacts.

in Verifiable at line 17
void verify()

Verify the user.

Return Value

void

in Verifiable at line 30
void requestVerification()

Request to be verified.

Return Value

void

in Verifiable at line 40
bool isVerified()

Check if the user has been verified.

Return Value

bool

in Verifiable at line 51
Builder scopeVerified(Builder $query)

Scope a query to only include verified users.

Parameters

Builder $query

Return Value

Builder

at line 56
static protected void boot()

The "booting" method of the model.

Return Value

void

at line 74
string getTypeAttribute()

Get the user type.

Return Value

string

at line 84
setPasswordAttribute(string $value)

Set the users password.

Parameters

string $value

at line 92
addresses()

Get the customers addresses.

at line 100
cart()

The customers cart.

at line 110
State state()

Get the users state.

Return Value

State

at line 118
favourites()

Get the customers favourite products.