aswi2020merlot-gitlab/app/Metadata.php @ 8e9897d4
1 |
<?php
|
---|---|
2 |
|
3 |
namespace App; |
4 |
|
5 |
use Illuminate\Database\Eloquent\Model; |
6 |
|
7 |
class Metadata extends Model |
8 |
{
|
9 |
// Table Name
|
10 |
protected $table = 'metadata';//same name could make problems |
11 |
// Primary Key
|
12 |
public $primaryKey = 'id';//unnecessery? |
13 |
|
14 |
/**
|
15 |
* The model's default values for attributes.
|
16 |
*
|
17 |
* @var array
|
18 |
*/
|
19 |
protected $attributes = [ |
20 |
'likes' => 0, |
21 |
];
|
22 |
|
23 |
/**
|
24 |
* Indicates if the model should be timestamped.
|
25 |
*
|
26 |
* @var bool
|
27 |
*/
|
28 |
public $timestamps = false; |
29 |
|
30 |
/**
|
31 |
* Get the artafact for this single metadata.
|
32 |
*/
|
33 |
public function artefact(){ |
34 |
return $this->belongsTo('App\Artefact'); |
35 |
}
|
36 |
|
37 |
|
38 |
}
|