3gsxarakiri

Untitled

Jan 26th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Models;
  4.  
  5. use Illuminate\Database\Eloquent\Model;
  6.  
  7. class UserInspection extends Model
  8. {
  9.     protected $table = 'user_inspections';
  10.     protected $fillable = ['inspection_id', 'partner_id', 'status', 'disable_id', 'comment'];
  11.  
  12.  
  13.     public function inspection()
  14.     {
  15.         return $this->belongsTo(Inspections::class);
  16.     }
  17.  
  18.     public function partner()
  19.     {
  20.         return $this->belongsTo(Partner::class, 'id');
  21.     }
  22. }
Add Comment
Please, Sign In to add comment