tissue/app/Metadata.php

23 lines
560 B
PHP
Raw Normal View History

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Metadata extends Model
{
public $incrementing = false;
protected $primaryKey = 'url';
protected $keyType = 'string';
protected $fillable = ['url', 'title', 'description', 'image', 'expires_at'];
protected $visible = ['url', 'title', 'description', 'image', 'expires_at', 'tags'];
2019-01-16 00:15:41 +09:00
2020-08-10 12:25:00 +09:00
protected $dates = ['created_at', 'updated_at', 'expires_at', 'error_at'];
public function tags()
{
return $this->belongsToMany(Tag::class)->withTimestamps();
}
}