mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-08 07:03:23 -06:00
54 lines
1.2 KiB
PHP
54 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* MassEditJournalRequest.php
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
*
|
|
* This software may be modified and distributed under the terms
|
|
* of the MIT license. See the LICENSE file for details.
|
|
*/
|
|
|
|
declare(strict_types = 1);
|
|
/**
|
|
* MassJournalRequest.php
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
*
|
|
* This software may be modified and distributed under the terms
|
|
* of the MIT license. See the LICENSE file for details.
|
|
*/
|
|
|
|
namespace FireflyIII\Http\Requests;
|
|
|
|
use Auth;
|
|
|
|
/**
|
|
* Class MassEditJournalRequest
|
|
*
|
|
*
|
|
* @package FireflyIII\Http\Requests
|
|
*/
|
|
class MassEditJournalRequest extends Request
|
|
{
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function authorize()
|
|
{
|
|
// Only allow logged in users
|
|
return Auth::check();
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'description.*' => 'required|min:1,max:255',
|
|
'source_account_id.*' => 'numeric|belongsToUser:accounts,id',
|
|
'destination_account_id.*' => 'numeric|belongsToUser:accounts,id',
|
|
'revenue_account' => 'max:255',
|
|
'expense_account' => 'max:255',
|
|
];
|
|
}
|
|
}
|