enable type checking when associating a model to a belongsto relation in laravel
Let's say i have three models User Post and Comment and linked like so: class User extends Model { public function posts(): HasMany { return $this->hasMany(Post::class); } } class Comment extends Model { public function post(): BelongsTo { return $this->belongsTo(Post::class);…