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