forked from eatvio/eatvio-infra
registration fix and refactoring
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user