Updated Map View

This commit is contained in:
2026-06-20 22:21:17 +10:00
parent 6fad966b7e
commit 05ca994253
52 changed files with 2038 additions and 803 deletions
+19 -6
View File
@@ -48,6 +48,10 @@ class User extends Authenticatable
$this->update(['settings' => array_merge($current, $values)]);
}
function updateSetting($settingName, $value) : void{
$this->updateSettings([$settingName => $value]);
}
protected function resolvedSettings(): Attribute
{
return Attribute::make(
@@ -80,11 +84,6 @@ class User extends Authenticatable
return $this->where('name', 'ilike', $value)->firstOrFail();
}
public function FlightController(): UserFlightController
{
return new UserFlightController($this);
}
public function flights(): HasMany {
return $this->hasMany(UserFlight::class);
}
@@ -114,7 +113,21 @@ class User extends Authenticatable
public function isFollowing(User $user): bool
{
return $this->following()->where('followee_id', $user->id)->exists();
return $this->following()
->where('followee_id', $user->id)
->verified()
->exists();
}
public function followStatus(User $user): string
{
$followee = $this->following()->where('followee_id', $user->id)->first();
if (!$followee) {
return 'none';
}
return $followee->verified ? 'following' : 'requested';
}
public function notifications(): HasMany