1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-22 07:42:41 +00:00

Update UserInvite model, add sender relation

This commit is contained in:
Daniel Supernault 2020-04-26 23:25:35 -06:00
parent 483548e217
commit 591a192928
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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}");
}
}