| 1 | <?php namespace JobApis\JobsToMail\Models; |
||
| 5 | class Token extends Model |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Indicates that the IDs are not auto-incrementing. |
||
| 9 | * |
||
| 10 | * @var bool |
||
| 11 | */ |
||
| 12 | public $incrementing = false; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * The attributes that are mass assignable. |
||
| 16 | * |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | protected $fillable = [ |
||
| 20 | 'user_id', |
||
| 21 | 'type', |
||
| 22 | ]; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * The primary key for the model. |
||
| 26 | * |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $primaryKey = 'token'; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * The name of the "updated at" column. |
||
| 33 | * |
||
| 34 | * @var string |
||
| 35 | */ |
||
| 36 | const UPDATED_AT = null; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Boot function from laravel. |
||
| 40 | */ |
||
| 41 | 5 | protected static function boot() |
|
| 50 | |||
| 51 | /** |
||
| 52 | * Defines the relationship to User model |
||
| 53 | * |
||
| 54 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 55 | */ |
||
| 56 | 1 | public function user() |
|
| 60 | |||
| 61 | /** |
||
| 62 | * Converts the Token model to a string by simply returning the "token" value |
||
| 63 | * |
||
| 64 | * @return string |
||
| 65 | */ |
||
| 66 | 1 | public function __toString() |
|
| 70 | } |
||
| 71 |