mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-21 22:11:26 +00:00
Update UserInvite model, add sender relation
This commit is contained in:
parent
483548e217
commit
591a192928
1 changed files with 6 additions and 3 deletions
|
@ -6,10 +6,13 @@ use Illuminate\Database\Eloquent\Model;
|
|||
|
||||
class UserInvite extends Model
|
||||
{
|
||||
public function sender()
|
||||
{
|
||||
return $this->belongsTo(Profile::class, 'profile_id');
|
||||
}
|
||||
|
||||
public function url()
|
||||
{
|
||||
$path = '/i/invite/code';
|
||||
$url = url($path, [$this->key, $this->token]);
|
||||
return $url;
|
||||
return url("/i/invite/code/{$this->key}/{$this->token}");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue