Projekt

Obecné

Profil

Stáhnout (985 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
<?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
    // Table Name
14
    protected $table = 'users';
15
    // Primary Key
16
    public $primaryKey = 'id';//unnecessery?
17

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

    
27
    /**
28
     * The attributes that should be hidden for arrays.
29
     *
30
     * @var array
31
     */
32
    protected $hidden = [
33
        'remember_token', 'password',
34
    ];
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

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