Projekt

Obecné

Profil

Stáhnout (1.09 KB) Statistiky
| Větev: | Tag: | Revize:
1 5d28dbf4 Marek Lovčí
<?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 43bb92a9 zabran
    // Table Name
13
    protected $table = 'users';
14
    // Primary Key
15 e765fd91 Marek Lovčí
    public $primaryKey = 'id';
16 43bb92a9 zabran
17 5d28dbf4 Marek Lovčí
    /**
18
     * The attributes that are mass assignable.
19
     *
20
     * @var array
21
     */
22
    protected $fillable = [
23 75508baf Marek Lovčí
         'name', 'email', 'password', 'register_hash'
24 5d28dbf4 Marek Lovčí
    ];
25
26
    /**
27
     * The attributes that should be hidden for arrays.
28
     *
29
     * @var array
30
     */
31
    protected $hidden = [
32 21570473 Adam Mištera
        'remember_token', 'password'
33 5d28dbf4 Marek Lovčí
    ];
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 43bb92a9 zabran
44
    /**
45
     * Get the artefacts for the user.
46
     */
47 e765fd91 Marek Lovčí
    public function likesArtefacts()
48 43bb92a9 zabran
    {
49 e765fd91 Marek Lovčí
        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 43bb92a9 zabran
    }
59 5d28dbf4 Marek Lovčí
}