1 | <?php |
||
7 | class Employees extends Model |
||
8 | { |
||
9 | /** |
||
10 | * @var bool |
||
11 | */ |
||
12 | public $timestamps = false; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $table = 'employees'; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $primaryKey = 'id'; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $appends = ['full_name']; |
||
28 | |||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $fillable = [ |
||
33 | 'company', |
||
34 | 'last_name', |
||
35 | 'first_name', |
||
36 | 'email_address', |
||
37 | 'job_title', |
||
38 | 'business_phone', |
||
39 | 'home_phone', |
||
40 | 'mobile_phone', |
||
41 | 'fax_number', |
||
42 | 'address', |
||
43 | 'city', |
||
44 | 'state_province', |
||
45 | 'zip_postal_code', |
||
46 | 'country_region', |
||
47 | 'web_page', |
||
48 | 'notes', |
||
49 | 'attachments', |
||
50 | ]; |
||
51 | |||
52 | /** |
||
53 | * @return \Illuminate\Database\Eloquent\Relations\HasOne |
||
54 | */ |
||
55 | public function latestOrders() |
||
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | public function getFullNameAttribute() |
||
67 | } |
||
68 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.