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 92577cfd 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 9635619e rizir01
         '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 01b004be zabran
    public function likesArtefacts()
48 43bb92a9 zabran
    {
49 09795926 Adam Mištera
        return $this->belongsToMany('App\Artefact');
50 43bb92a9 zabran
    }
51 01b004be zabran
52
    /**
53
     * Get the metadata for the user.
54
     */
55
    public function likesMetadata()
56
    {
57 09795926 Adam Mištera
        return $this->belongsToMany('App\Metadata');
58 01b004be zabran
    }
59 5d28dbf4 Marek Lovčí
}