<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Poll extends Model
{
  use SoftDeletes;
  
  protected $hidden = [
    'user_id', 'updated_at', 'deleted_at',
  ];

  protected $dates = ['deleted_at'];

  public function users()
  {
    return $this->belongsTo(User::class);
  }

  public function answers()
  {
    return $this->hasMany(Answer::class);
  }
}

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Poll extends Model
{
  use SoftDeletes;
  
  protected $hidden = [
    'user_id', 'updated_at', 'deleted_at',
  ];

  protected $dates = ['deleted_at'];

  public function user()
  {
    return $this->belongsTo(User::class);
  }

  public function answers()
  {
    return $this->hasMany(Answer::class);
  }
}

Revert "Rename 'user' to 'users' on poll model"
Revert "Rename 'user' to 'users' on poll model"

This reverts commit 01453bc86a9dd1ef8f565f60163d9e3401283f0d.
