1: <?php
2:
3: namespace App;
4:
5: use Illuminate\Database\Eloquent\Model;
6:
7: class Comment extends Model
8: {
9: /**
10: * The database table used by the model.
11: *
12: * @var string
13: */
14: protected $table = 'comment';
15:
16:
17: /**
18: * The attributes that are mass assignable.
19: *
20: * @var array
21: */
22: protected $fillable = [
23: 'driver_id',
24: 'comment',
25: 'star_rating',
26: 'approved'
27: ];
28:
29: public function driver(){
30: return $this->belongsTo('App\Driver');
31: }
32: }
33: