ConsumableAssignment.php
Go to the documentation of this file.
1 <?php
2 namespace App\Models;
3 
5 
6 class ConsumableAssignment extends Model
7 {
9 
10  protected $dates = ['deleted_at'];
11  protected $table = 'consumables_users';
12 
13  public function consumable()
14  {
15  return $this->belongsTo('\App\Models\Consumable');
16  }
17 
18  public function user()
19  {
20  return $this->belongsTo('\App\Models\User', 'assigned_to');
21  }
22 
23  public function admin()
24  {
25  return $this->belongsTo('\App\Models\User', 'user_id');
26  }
27 }