You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error when I add a relationship to my model
Like this.
something like this
use DGvai\Review\Review;
use DGvai\Review\Reviewable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Bootcamp extends Model
{
use Reviewable;
use HasFactory;
public function reviews(): HasMany
{
return $this->hasMany(Review::class, 'model_id')->with('user')->active();
}