mirror of https://github.com/movim/movim
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
337 B
21 lines
337 B
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Attachment extends Model
|
|
{
|
|
protected $primaryKey = 'id';
|
|
protected $guarded = [];
|
|
|
|
public function post()
|
|
{
|
|
return $this->belongsTo('App\Post');
|
|
}
|
|
|
|
public function getUrlAttribute()
|
|
{
|
|
return parse_url($this->href);
|
|
}
|
|
}
|