URL generation (front&back) + fixed authJWT for SSR

This commit is contained in:
Julien Nahum
2024-01-11 14:07:27 +01:00
parent 630ae1df1d
commit 5a3978874a
18 changed files with 81 additions and 21 deletions

View File

@@ -157,12 +157,12 @@ class Form extends Model implements CachableAttributes
if ($this->custom_domain) {
return 'https://' . $this->custom_domain . '/forms/' . $this->slug;
}
return '/forms/' . $this->slug;
return front_url('/forms/' . $this->slug);
}
public function getEditUrlAttribute()
{
return url('/forms/' . $this->slug . '/show');
return front_url('/forms/' . $this->slug . '/show');
}
public function getSubmissionsCountAttribute()

View File

@@ -48,7 +48,7 @@ class Template extends Model
public function getShareUrlAttribute()
{
return url('/form-templates/'.$this->slug);
return front_url('/form-templates/'.$this->slug);
}
public function setDescriptionAttribute($value)