| 1 | <?php |
||
| 12 | class User extends Authenticatable |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * The attributes that are mass assignable. |
||
| 16 | * |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | protected $fillable = [ |
||
| 20 | 'name', 'email', 'password', |
||
| 21 | ]; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The attributes that should be hidden for arrays. |
||
| 25 | * |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | protected $hidden = [ |
||
| 29 | 'password', 'remember_token', |
||
| 30 | ]; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Get videos. |
||
| 34 | * |
||
| 35 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
| 36 | */ |
||
| 37 | 19 | public function getVideos() |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Get ApiKey. |
||
| 44 | * |
||
| 45 | * @return \Illuminate\Database\Eloquent\Relations\HasOne |
||
| 46 | */ |
||
| 47 | 28 | public function apiKey() |
|
| 51 | |||
| 52 | /** |
||
| 53 | * Get likes. |
||
| 54 | * |
||
| 55 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
| 56 | */ |
||
| 57 | public function getLikes() |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Get comments. |
||
| 64 | * |
||
| 65 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
| 66 | */ |
||
| 67 | public function getComments() |
||
| 71 | } |
||
| 72 |