mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Should allow to store new accounts.
This commit is contained in:
@@ -2,10 +2,19 @@
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
class Transaction extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $fillable = ['account_id', 'transaction_journal_id', 'description', 'amount'];
|
||||
protected $rules
|
||||
= [
|
||||
'account_id' => 'required|exists:accounts,id',
|
||||
'transaction_journal_id' => 'required|exists:transaction_journals,id',
|
||||
'description' => 'between:1,255',
|
||||
'amount' => 'required|numeric'
|
||||
];
|
||||
use SoftDeletes, ValidatingTrait;
|
||||
|
||||
public function account()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user