add a pirep_comments table
This commit is contained in:
35
app/Models/PirepComment.php
Normal file
35
app/Models/PirepComment.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Eloquent as Model;
|
||||
|
||||
/**
|
||||
* Class PirepEvent
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class PirepComment extends Model
|
||||
{
|
||||
public $table = 'pirep_comments';
|
||||
|
||||
public $fillable
|
||||
= [
|
||||
'comment',
|
||||
];
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $rules
|
||||
= [
|
||||
'comment' => 'required',
|
||||
];
|
||||
|
||||
public function pirep()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Pirep', 'pirep_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user