Replace Laravel binder with own binder. This will save in queries and increase security.

This commit is contained in:
James Cole
2017-12-25 08:45:23 +01:00
parent 96ccce5db3
commit bf390b65d9
37 changed files with 1671 additions and 142 deletions

View File

@@ -52,6 +52,7 @@ class PiggyBankEvent extends Model
protected $hidden = ['amount_encrypted'];
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function piggyBank()
@@ -60,14 +61,16 @@ class PiggyBankEvent extends Model
}
/**
* @codeCoverageIgnore
* @param $value
*/
public function setAmountAttribute($value)
{
$this->attributes['amount'] = strval(round($value, 2));
$this->attributes['amount'] = strval($value);
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function transactionJournal()