Projekt

Obecné

Profil

Stáhnout (1.13 KB) Statistiky
| Větev: | Tag: | Revize:
1 5d28dbf4 Marek Lovčí
<?php
2
3
namespace App;
4
5
use Illuminate\Contracts\Auth\MustVerifyEmail;
6
use Illuminate\Foundation\Auth\User as Authenticatable;
7
use Illuminate\Notifications\Notifiable;
8
9
class User extends Authenticatable
10
{
11
    use Notifiable;
12
13 43bb92a9 zabran
    // Table Name
14
    protected $table = 'users';
15
    // Primary Key
16
    public $primaryKey = 'id';//unnecessery?
17
18 5d28dbf4 Marek Lovčí
    /**
19
     * The attributes that are mass assignable.
20
     *
21
     * @var array
22
     */
23
    protected $fillable = [
24 21570473 Adam Mištera
         'name', 'email', 'password'
25 5d28dbf4 Marek Lovčí
    ];
26
27
    /**
28
     * The attributes that should be hidden for arrays.
29
     *
30
     * @var array
31
     */
32
    protected $hidden = [
33 21570473 Adam Mištera
        'remember_token', 'password'
34 5d28dbf4 Marek Lovčí
    ];
35
36
    /**
37
     * The attributes that should be cast to native types.
38
     *
39
     * @var array
40
     */
41
    protected $casts = [
42
        'email_verified_at' => 'datetime',
43
    ];
44 43bb92a9 zabran
45
    /**
46
     * Get the artefacts for the user.
47
     */
48 01b004be zabran
    public function likesArtefacts()
49 43bb92a9 zabran
    {
50 09795926 Adam Mištera
        return $this->belongsToMany('App\Artefact');
51 43bb92a9 zabran
    }
52 01b004be zabran
53
    /**
54
     * Get the metadata for the user.
55
     */
56
    public function likesMetadata()
57
    {
58 09795926 Adam Mištera
        return $this->belongsToMany('App\Metadata');
59 01b004be zabran
    }
60 5d28dbf4 Marek Lovčí
}