Update UserInvite model, add sender relation

pull/2147/head
Daniel Supernault 5 years ago
parent 483548e217
commit 591a192928
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -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…
Cancel
Save