23eb9dcbda
* 384 Laravel 6 changes * Library versions * Update package versions * Add keyType to models * Remove unused dependencies * StyleCI fixes * Fix models for test * Fix tests output and update test runner * Unused imports * Update exceptions handler * Fix login page
35 lines
554 B
PHP
35 lines
554 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Contracts\Model;
|
|
|
|
/**
|
|
* @property string pirep_id
|
|
* @property int user_id
|
|
*/
|
|
class PirepComment extends Model
|
|
{
|
|
public $table = 'pirep_comments';
|
|
|
|
protected $fillable = [
|
|
'pirep_id',
|
|
'user_id',
|
|
'comment',
|
|
];
|
|
|
|
public static $rules = [
|
|
'comment' => 'required',
|
|
];
|
|
|
|
public function pirep()
|
|
{
|
|
return $this->belongsTo(Pirep::class, 'pirep_id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id');
|
|
}
|
|
}
|