Projekt

Obecné

Profil

Stáhnout (1.08 KB) Statistiky
| Větev: | Tag: | Revize:
1
<?php
2

    
3
namespace App;
4

    
5
use Illuminate\Foundation\Auth\User as Authenticatable;
6
use Illuminate\Notifications\Notifiable;
7

    
8
class User extends Authenticatable
9
{
10
    use Notifiable;
11

    
12
    // Table Name
13
    protected $table = 'users';
14
    // Primary Key
15
    public $primaryKey = 'id';
16

    
17
    /**
18
     * The attributes that are mass assignable.
19
     *
20
     * @var array
21
     */
22
    protected $fillable = [
23
         'name', 'email', 'password'
24
    ];
25

    
26
    /**
27
     * The attributes that should be hidden for arrays.
28
     *
29
     * @var array
30
     */
31
    protected $hidden = [
32
        'remember_token', 'password'
33
    ];
34

    
35
    /**
36
     * The attributes that should be cast to native types.
37
     *
38
     * @var array
39
     */
40
    protected $casts = [
41
        'email_verified_at' => 'datetime',
42
    ];
43

    
44
    /**
45
     * Get the artefacts for the user.
46
     */
47
    public function likesArtefacts()
48
    {
49
        return $this->belongsToMany('App\Artefact');
50
    }
51

    
52
    /**
53
     * Get the metadata for the user.
54
     */
55
    public function likesMetadata()
56
    {
57
        return $this->belongsToMany('App\Metadata');
58
    }
59
}
(6-6/6)