. */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** * Class ReconciliationUpdateRequest. */ class ReconciliationUpdateRequest extends Request { /** * @return bool */ public function authorize() { // Only allow logged in users return auth()->check(); } /** * Returns and validates the data required to update a reconciliation. * * @return array */ public function getJournalData() { $data = [ 'tags' => explode(',', $this->string('tags')), 'amount' => $this->string('amount'), 'category' => $this->string('category'), ]; return $data; } /** * @return array */ public function rules() { $rules = [ 'amount' => 'numeric|required', 'category' => 'between:1,255|nullable', ]; return $rules; } }