\App\CastsToArray

Class ToArray

Summary

Methods
Properties
Constants
get()
set()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

get()

get(\Illuminate\Database\Eloquent\Model  $model, string  $key, mixed  $value, array  $attributes) : array

将取出的数据进行转换

Parameters

\Illuminate\Database\Eloquent\Model $model
string $key
mixed $value
array $attributes

Returns

array

set()

set(\Illuminate\Database\Eloquent\Model  $model, string  $key, array  $value, array  $attributes) : string

转换成将要进行存储的值

Parameters

\Illuminate\Database\Eloquent\Model $model
string $key
array $value
array $attributes

Returns

string