mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
564 B
PHTML
33 lines
564 B
PHTML
|
8 years ago
|
<?php
|
||
|
|
|
||
|
4 weeks ago
|
namespace App\Models;
|
||
|
8 years ago
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class Circle extends Model
|
||
|
|
{
|
||
|
4 weeks ago
|
protected $guarded = [];
|
||
|
8 years ago
|
|
||
|
|
public function members()
|
||
|
|
{
|
||
|
9 months ago
|
return $this->hasManyThrough(
|
||
|
|
Profile::class,
|
||
|
|
CircleProfile::class,
|
||
|
|
'circle_id',
|
||
|
|
'id',
|
||
|
|
'id',
|
||
|
|
'profile_id'
|
||
|
|
);
|
||
|
8 years ago
|
}
|
||
|
|
|
||
|
|
public function owner()
|
||
|
|
{
|
||
|
9 months ago
|
return $this->belongsTo(Profile::class, 'profile_id');
|
||
|
8 years ago
|
}
|
||
|
|
|
||
|
|
public function url()
|
||
|
|
{
|
||
|
|
return url("/i/circle/show/{$this->id}");
|
||
|
|
}
|
||
|
|
}
|