Vote.php 266 B

123456789101112131415
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. class Vote extends Model
  6. {
  7. use HasFactory;
  8. public function voter() {
  9. return $this->belongsTo(User::class, 'user');
  10. }
  11. }