Projekt

Obecné

Profil

Stáhnout (780 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
<?php
2

    
3
namespace App;
4

    
5
use Illuminate\Database\Eloquent\Model;
6

    
7
class Artefact extends Model
8
{
9
    // Table Name
10
    protected $table = 'artefacts';
11
    // Primary Key
12
    public $primaryKey = 'id';
13

    
14
    /**
15
     * Indicates if the model should be timestamped.
16
     *
17
     * @var bool
18
     */
19
    public $timestamps = false;
20

    
21
    /**
22
     * Get the metadata for the artefact.
23
     */
24
    public function metadata()
25
    {
26
        return $this->hasMany('App\Metadata');
27
    }
28

    
29
    /**
30
     * Get the categories for the artefact.
31
     */
32
    public function categories()
33
    {
34
        return $this->belongsToMany('App\Category');
35
    }
36

    
37
    /**
38
     * Get the users for the artefact.
39
     */
40
    public function users()
41
    {
42
        return $this->belongsToMany('App\User');
43
    }
44
}
(1-1/6)