| Total Complexity | 2 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 8 | class InstamojoRefund extends Model |
||
| 9 | { |
||
| 10 | use SoftDeletes; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * The table associated with the model. |
||
| 14 | * |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $table = 'instamojo_refund'; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * The attributes that are mass assignable. |
||
| 21 | * |
||
| 22 | * @var array |
||
| 23 | */ |
||
| 24 | protected $fillable = ['user_id','refund_id','payment_id','status','type','body','refund_amount','total_amount','created_by']; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * The "booting" method of the model. |
||
| 28 | * |
||
| 29 | * @return void |
||
| 30 | */ |
||
| 31 | public static function boot() |
||
| 32 | { |
||
| 33 | parent::boot(); |
||
| 34 | |||
| 35 | static::creating(function($model) { |
||
| 36 | $model->created_by = \Auth::user()->id; |
||
|
|
|||
| 37 | }); |
||
| 38 | |||
| 39 | static::updating(function($model) { |
||
| 40 | $model->updated_by = \Auth::user()->id; |
||
| 41 | }); |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * [user description] |
||
| 46 | * @return [type] [description] |
||
| 47 | */ |
||
| 48 | public function user() |
||
| 51 | } |
||
| 52 | } |
||
| 53 |