1 |
344b1e53
|
zabran
|
<?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 |
43bb92a9
|
zabran
|
/*protected $attributes = [
|
20 |
344b1e53
|
zabran
|
'likes' => 0,
|
21 |
43bb92a9
|
zabran
|
];*/
|
22 |
344b1e53
|
zabran
|
|
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 |
|
|
}
|