registration fix and refactoring

This commit is contained in:
Anatoliy Poloz
2024-01-24 11:21:57 +03:00
parent 70e0b066a9
commit cecccba951
20 changed files with 410 additions and 311 deletions

View File

@@ -32,7 +32,6 @@ use Spatie\Sluggable\SlugOptions;
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property string $slug
*
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $author
* @property-read int|null $author_count
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PlanComment> $comments
@@ -102,7 +101,7 @@ class Plan extends Model implements Viewable
return 'slug';
}
public function author(): BelongsToMany
public function author(): ?BelongsToMany
{
return $this->belongsToMany(User::class, 'plan_author', 'plan_id', 'user_id');
}