| 1 | <?php |
||
| 7 | class Syslog extends Model |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The table associated with the model. |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $table = 'devices'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The primary key column name. |
||
| 18 | * |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $primaryKey = 'null'; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Indicates if the IDs are auto-incrementing. |
||
| 25 | * |
||
| 26 | * @var bool |
||
| 27 | */ |
||
| 28 | public $incrementing = false; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Indicates if the model should be timestamped. |
||
| 32 | * |
||
| 33 | * @var bool |
||
| 34 | */ |
||
| 35 | public $timestamps = false; |
||
| 36 | |||
| 37 | |||
| 38 | // ---- Accessors/Mutators ---- |
||
| 39 | |||
| 40 | |||
| 41 | // ---- Define Reletionships ---- |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Returns the device this entry belongs to. |
||
| 45 | */ |
||
| 46 | public function device() { |
||
| 49 | |||
| 50 | } |
||
| 51 |
If you implement
__calland you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__callis implemented by a parent class and only the child class knows which methods exist: