Remove references to short domain
This commit is contained in:
parent
328c9badb4
commit
7a58287b34
27 changed files with 215 additions and 404 deletions
|
@ -26,7 +26,7 @@ class Bookmark extends Model
|
|||
return $this->belongsToMany('App\Models\Tag');
|
||||
}
|
||||
|
||||
protected function longurl(): Attribute
|
||||
protected function local_uri(): Attribute
|
||||
{
|
||||
return Attribute::get(
|
||||
get: fn () => config('app.url') . '/bookmarks/' . $this->id,
|
||||
|
|
|
@ -124,7 +124,7 @@ class Note extends Model
|
|||
public function getNoteAttribute(?string $value): ?string
|
||||
{
|
||||
if ($value === null && $this->place !== null) {
|
||||
$value = '📍: <a href="' . $this->place->longurl . '">' . $this->place->name . '</a>';
|
||||
$value = '📍: <a href="' . $this->place->uri . '">' . $this->place->name . '</a>';
|
||||
}
|
||||
|
||||
// if $value is still null, just return null
|
||||
|
@ -172,16 +172,11 @@ class Note extends Model
|
|||
return (string) resolve(Numbers::class)->numto60($this->id);
|
||||
}
|
||||
|
||||
public function getLongurlAttribute(): string
|
||||
public function getUriAttribute(): string
|
||||
{
|
||||
return config('app.url') . '/notes/' . $this->nb60id;
|
||||
}
|
||||
|
||||
public function getShorturlAttribute(): string
|
||||
{
|
||||
return config('url.shorturl') . '/notes/' . $this->nb60id;
|
||||
}
|
||||
|
||||
public function getIso8601Attribute(): string
|
||||
{
|
||||
return $this->updated_at->toISO8601String();
|
||||
|
|
|
@ -74,24 +74,10 @@ class Place extends Model
|
|||
]));
|
||||
}
|
||||
|
||||
protected function longurl(): Attribute
|
||||
{
|
||||
return Attribute::get(
|
||||
get: fn ($value, $attributes) => config('app.url') . '/places/' . $attributes['slug'],
|
||||
);
|
||||
}
|
||||
|
||||
protected function shorturl(): Attribute
|
||||
{
|
||||
return Attribute::get(
|
||||
get: fn ($value, $attributes) => config('url.shorturl') . '/places/' . $attributes['slug'],
|
||||
);
|
||||
}
|
||||
|
||||
protected function uri(): Attribute
|
||||
{
|
||||
return Attribute::get(
|
||||
get: fn () => $this->longurl,
|
||||
get: static fn ($value, $attributes) => config('app.url') . '/places/' . $attributes['slug'],
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue